From d095aec6ce9898c422e86df46195e3410eb1f163 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 12 Dec 2013 18:48:14 +0100 Subject: new mdev fix --- package/base-files/Makefile | 2 +- package/base-files/src/etc/mdev.conf | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'package') diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5c5329a9a..cae7b1009 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk PKG_NAME:= base-files PKG_VERSION:= 1.0 -PKG_RELEASE:= 61 +PKG_RELEASE:= 62 PKG_SECTION:= base PKG_DESCR:= basic files and scripts PKG_BUILDDEP:= pkgconf-host file-host diff --git a/package/base-files/src/etc/mdev.conf b/package/base-files/src/etc/mdev.conf index 4cc06251a..fc63d80d9 100644 --- a/package/base-files/src/etc/mdev.conf +++ b/package/base-files/src/etc/mdev.conf @@ -10,11 +10,9 @@ rtc0 root:root 660 @ln -sf /dev/rtc0 /dev/rtc device-mapper 0:0 660 @test -d /dev/mapper || mkdir /dev/mapper tun 0:0 660 >net/tun fb0 root:video 660 -audio root:audio 660 >snd/audio -dsp root:audio 660 >snd/dsp -timer root:audio 660 >snd/timer -controlC0 root:audio 660 >snd/controlC0 -pcmC0D0c root:audio 660 >snd/pcmC0D0c -pcmC0D0p root:audio 660 >snd/pcmC0D0p +snd/timer root:audio 660 +snd/controlC0 root:audio 660 +snd/pcmC0D0c root:audio 660 +snd/pcmC0D0p root:audio 660 msr0 root:root 660 @(mkdir -p /dev/cpu/0 && ln -sf /dev/msr0 /dev/cpu/0/msr) .* 0:0 644 @/lib/mdev/init -- cgit v1.2.3 From 18b865b3c0008d5d392cf33660f8e2b98cbf154f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 28 Dec 2013 18:23:22 +0100 Subject: fix for musl compile --- package/ptunnel/Makefile | 2 +- package/ptunnel/patches/patch-ptunnel_c | 11 +++++++++++ package/ptunnel/patches/patch-ptunnel_h | 11 +++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 package/ptunnel/patches/patch-ptunnel_c create mode 100644 package/ptunnel/patches/patch-ptunnel_h (limited to 'package') diff --git a/package/ptunnel/Makefile b/package/ptunnel/Makefile index f4186c626..ea564a5fd 100644 --- a/package/ptunnel/Makefile +++ b/package/ptunnel/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ptunnel PKG_VERSION:= 0.61 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= b45f73875f2af48f101816672f83a5fe PKG_DESCR:= Tunnel TCP connections over ICMP packets PKG_SECTION:= net/security diff --git a/package/ptunnel/patches/patch-ptunnel_c b/package/ptunnel/patches/patch-ptunnel_c new file mode 100644 index 000000000..40fd0a76f --- /dev/null +++ b/package/ptunnel/patches/patch-ptunnel_c @@ -0,0 +1,11 @@ +--- ptunnel-0.61.orig/ptunnel.c 2005-07-13 11:57:27.000000000 +0200 ++++ ptunnel-0.61/ptunnel.c 2013-12-28 18:21:38.000000000 +0100 +@@ -43,7 +43,7 @@ + #include "ptunnel.h" + #include + #include +-#include ++#include + #include + #include + #include diff --git a/package/ptunnel/patches/patch-ptunnel_h b/package/ptunnel/patches/patch-ptunnel_h new file mode 100644 index 000000000..85d8caebb --- /dev/null +++ b/package/ptunnel/patches/patch-ptunnel_h @@ -0,0 +1,11 @@ +--- ptunnel-0.61.orig/ptunnel.h 2005-07-13 11:57:27.000000000 +0200 ++++ ptunnel-0.61/ptunnel.h 2013-12-28 18:22:22.000000000 +0100 +@@ -44,7 +44,7 @@ + #define PING_TUNNEL_H + + // Includes +- #include ++ #include + #include + #include + #include -- cgit v1.2.3 From 604bc6783c0b29e27e22606e79aa377b53a4cd23 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 28 Dec 2013 19:41:41 +0100 Subject: fix musl compile, convert to termios --- package/comgt/Makefile | 2 +- package/comgt/patches/patch-comgt_c | 47 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 package/comgt/patches/patch-comgt_c (limited to 'package') diff --git a/package/comgt/Makefile b/package/comgt/Makefile index cc2041150..f8433814e 100644 --- a/package/comgt/Makefile +++ b/package/comgt/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= comgt PKG_VERSION:= 0.32 -PKG_RELEASE:= 2 +PKG_RELEASE:= 3 PKG_MD5SUM:= db2452680c3d953631299e331daf49ef PKG_DESCR:= 3G/GPRS datacard control tool PKG_SECTION:= utils diff --git a/package/comgt/patches/patch-comgt_c b/package/comgt/patches/patch-comgt_c new file mode 100644 index 000000000..666423ba5 --- /dev/null +++ b/package/comgt/patches/patch-comgt_c @@ -0,0 +1,47 @@ +--- comgt.0.32.orig/comgt.c 2006-10-20 16:49:46.000000000 +0200 ++++ comgt.0.32/comgt.c 2013-12-28 19:40:28.000000000 +0100 +@@ -30,7 +30,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +@@ -81,7 +81,7 @@ char token[MAXTOKEN]; /* For gettoken( + char scriptfile[MAXPATH]; /* Script file name */ + char scriptfilepath[MAXPATH]; /* temp storage for full path */ + BOOL verbose=0; /* Log actions */ +-struct termio cons, stbuf, svbuf; /* termios: svbuf=before, stbuf=while */ ++struct termios cons, stbuf, svbuf; /* termios: svbuf=before, stbuf=while */ + int comfd=0; /* Communication file descriptor. Defaults to stdin. */ + char msg[STRINGL]; /* Massage messages here */ + int preturn,returns[MAXGOSUBS]; +@@ -926,7 +926,7 @@ void setcom(void) { + } + + void doset(void) { +- struct termio console; ++ struct termios console; + int a,b; + gettoken(); + if(strcmp(token,"echo")==0) { +@@ -1281,7 +1281,7 @@ void opengt(void) { + parity=stbuf.c_cflag & (PARENB | PARODD); + stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR ); + stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET); +- stbuf.c_lflag &= ~(ICANON | XCASE | ECHO | ECHOE | ECHONL); ++ stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL); + stbuf.c_lflag &= ~(ECHO | ECHOE); + stbuf.c_cc[VMIN] = 1; + stbuf.c_cc[VTIME] = 0; +@@ -1336,7 +1336,7 @@ void opendevice(void) { + parity=stbuf.c_cflag & (PARENB | PARODD); + stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY | IGNPAR ); + stbuf.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET); +- stbuf.c_lflag &= ~(ICANON | XCASE | ECHO | ECHOE | ECHONL); ++ stbuf.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL); + stbuf.c_lflag &= ~(ECHO | ECHOE); + stbuf.c_cc[VMIN] = 1; + stbuf.c_cc[VTIME] = 0; -- cgit v1.2.3 From dcbba47889ece1b83a1744701463a8fb04a1fc50 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 28 Dec 2013 20:16:56 +0100 Subject: update to latest stable version --- package/lsscsi/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'package') diff --git a/package/lsscsi/Makefile b/package/lsscsi/Makefile index 3a8cd740d..8cc747238 100644 --- a/package/lsscsi/Makefile +++ b/package/lsscsi/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= lsscsi -PKG_VERSION:= 0.25 +PKG_VERSION:= 0.27 PKG_RELEASE:= 1 -PKG_MD5SUM:= c4e36b106624aff78527c54cf08ecbfe +PKG_MD5SUM:= 33ab2927a9e567a47905e6a618c17859 PKG_DESCR:= list SCSI devices PKG_SECTION:= utils PKG_URL:= http://sg.danny.cz/scsi/lsscsi.html -- cgit v1.2.3 From 37eb0e152762b3471b40a00946f5e6aba354b7c2 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 29 Dec 2013 10:11:40 +0100 Subject: add glib dependency --- package/libmms/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'package') diff --git a/package/libmms/Makefile b/package/libmms/Makefile index 9e2c2108a..cfd900c0d 100644 --- a/package/libmms/Makefile +++ b/package/libmms/Makefile @@ -9,6 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 9f63aa363deb4874e072a45850161bff PKG_DESCR:= common library for parsing mms:// type network streams PKG_SECTION:= libs +PKG_BUILDDEP:= glib +PKG_DEPENDS:= glib PKG_URL:= http://libmms.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libmms/} PKG_OPTS:= dev -- cgit v1.2.3 From df30f7362b13fadf5a996e1303ba8488699a7ec6 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 29 Dec 2013 19:08:39 +0100 Subject: disable libwrap --- package/mpd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/mpd/Makefile b/package/mpd/Makefile index 46a1262c4..aa227c4ec 100644 --- a/package/mpd/Makefile +++ b/package/mpd/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mpd PKG_VERSION:= 0.18.5 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 63bcf6ce338caa2ae2cd6dc8e9710d5c PKG_DESCR:= A music player daemon PKG_SECTION:= multimedia @@ -126,6 +126,7 @@ CONFIGURE_ARGS+= --disable-jack \ --disable-pulse \ --disable-oss \ --disable-bzip2 \ + --disable-libwrap \ --disable-mpc \ --disable-wavpack \ --disable-modplug \ -- cgit v1.2.3 From e6e5113cb91830bc97a778d98b3c551b25d8f5cb Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 30 Dec 2013 11:24:18 +0100 Subject: fix musl compile --- package/traceroute/Makefile | 4 +- package/traceroute/patches/patch-Make_rules | 14 +-- package/traceroute/patches/patch-traceroute_csum_c | 17 +++ .../patches/patch-traceroute_extension_c | 61 ++++++++++ .../traceroute/patches/patch-traceroute_mod-dccp_c | 55 +++++++++ .../traceroute/patches/patch-traceroute_mod-icmp_c | 22 ++++ .../traceroute/patches/patch-traceroute_mod-tcp_c | 126 +++++++++++++++++++++ .../traceroute/patches/patch-traceroute_mod-udp_c | 20 ++++ .../patches/patch-traceroute_traceroute_c | 34 ++++++ .../patches/patch-traceroute_traceroute_h | 11 ++ 10 files changed, 355 insertions(+), 9 deletions(-) create mode 100644 package/traceroute/patches/patch-traceroute_csum_c create mode 100644 package/traceroute/patches/patch-traceroute_extension_c create mode 100644 package/traceroute/patches/patch-traceroute_mod-dccp_c create mode 100644 package/traceroute/patches/patch-traceroute_mod-icmp_c create mode 100644 package/traceroute/patches/patch-traceroute_mod-tcp_c create mode 100644 package/traceroute/patches/patch-traceroute_mod-udp_c create mode 100644 package/traceroute/patches/patch-traceroute_traceroute_c create mode 100644 package/traceroute/patches/patch-traceroute_traceroute_h (limited to 'package') diff --git a/package/traceroute/Makefile b/package/traceroute/Makefile index 31ee8bd4c..c908cc34d 100644 --- a/package/traceroute/Makefile +++ b/package/traceroute/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= traceroute -PKG_VERSION:= 2.0.18 +PKG_VERSION:= 2.0.19 PKG_RELEASE:= 1 -PKG_MD5SUM:= b7254149b7f081cce07f4b9e065ba5ef +PKG_MD5SUM:= dd15d563993020d088ba02e8f987deaf PKG_DESCR:= Utility to trace the route of IP packets PKG_SECTION:= net PKG_URL:= http://traceroute.sourceforge.net/ diff --git a/package/traceroute/patches/patch-Make_rules b/package/traceroute/patches/patch-Make_rules index 35f8b4003..5d347bc68 100644 --- a/package/traceroute/patches/patch-Make_rules +++ b/package/traceroute/patches/patch-Make_rules @@ -1,5 +1,5 @@ ---- traceroute-2.0.16.orig/Make.rules 2010-09-09 16:20:46.000000000 +0200 -+++ traceroute-2.0.16/Make.rules 2010-10-11 20:07:03.000000000 +0200 +--- traceroute-2.0.19.orig/Make.rules 2012-03-27 15:49:04.000000000 +0200 ++++ traceroute-2.0.19/Make.rules 2013-12-29 20:01:35.000000000 +0100 @@ -46,14 +46,14 @@ $(call set, INSTALL, cp) $(call set, INDENT, true) @@ -15,11 +15,11 @@ -prefix = /usr/local +prefix = /usr - exec_prefix = $(prefix) - bindir = $(exec_prefix)/bin -@@ -125,7 +125,7 @@ _libs = $(strip $(foreach lib,$(LIBDIRS) - $(wildcard $(srcdir)/$(lib)/$(lib).so \ - $(srcdir)/$(lib)/$(lib).a)))) + ifneq ($(wildcard /lib64/libc.* /usr/lib64/libc.*),) + lib := lib64 +@@ -131,7 +131,7 @@ _libs = $(strip $(foreach _lib,$(LIBDIRS + $(wildcard $(srcdir)/$(_lib)/$(_lib).so \ + $(srcdir)/$(_lib)/$(_lib).a)))) -override LIBS := $(_libs) -lm $(LIBS) +override LIBS := $(_libs) $(LIBS) diff --git a/package/traceroute/patches/patch-traceroute_csum_c b/package/traceroute/patches/patch-traceroute_csum_c new file mode 100644 index 000000000..8332de5e4 --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_csum_c @@ -0,0 +1,17 @@ +--- traceroute-2.0.19.orig/traceroute/csum.c 2007-07-19 16:47:55.000000000 +0200 ++++ traceroute-2.0.19/traceroute/csum.c 2013-12-29 20:01:35.000000000 +0100 +@@ -12,11 +12,11 @@ + #include "traceroute.h" + + +-u_int16_t in_csum (const void *ptr, size_t len) { +- const u_int16_t *p = (const u_int16_t *) ptr; ++uint16_t in_csum (const void *ptr, size_t len) { ++ const uint16_t *p = (const uint16_t *) ptr; + size_t nw = len / 2; + unsigned int sum = 0; +- u_int16_t res; ++ uint16_t res; + + while (nw--) sum += *p++; + diff --git a/package/traceroute/patches/patch-traceroute_extension_c b/package/traceroute/patches/patch-traceroute_extension_c new file mode 100644 index 000000000..94606f546 --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_extension_c @@ -0,0 +1,61 @@ +--- traceroute-2.0.19.orig/traceroute/extension.c 2010-07-14 16:29:08.000000000 +0200 ++++ traceroute-2.0.19/traceroute/extension.c 2013-12-29 20:01:35.000000000 +0100 +@@ -14,16 +14,16 @@ struct icmp_ext_header { + unsigned int reserved:4; + unsigned int version:4; + #endif +- u_int8_t reserved1; +- u_int16_t checksum; ++ uint8_t reserved1; ++ uint16_t checksum; + } __attribute__ ((packed)); + + + struct icmp_ext_object { +- u_int16_t length; +- u_int8_t class; +- u_int8_t c_type; +- u_int8_t data[0]; ++ uint16_t length; ++ uint8_t class; ++ uint8_t c_type; ++ uint8_t data[0]; + }; + + #define MPLS_CLASS 1 +@@ -49,7 +49,7 @@ static int try_extension (probe *pb, cha + if (iext->version != 2) return -1; + + if (iext->checksum && +- in_csum (iext, len) != (u_int16_t) ~0 ++ in_csum (iext, len) != (uint16_t) ~0 + ) return -1; + + buf += sizeof (*iext); +@@ -60,7 +60,7 @@ static int try_extension (probe *pb, cha + struct icmp_ext_object *obj = (struct icmp_ext_object *) buf; + size_t objlen = ntohs (obj->length); + size_t data_len; +- u_int32_t *ui = (u_int32_t *) obj->data; ++ uint32_t *ui = (uint32_t *) obj->data; + int i, n; + + if (objlen < sizeof (*obj) || +@@ -68,7 +68,7 @@ static int try_extension (probe *pb, cha + ) return -1; + + data_len = objlen - sizeof (*obj); +- if (data_len % sizeof (u_int32_t)) ++ if (data_len % sizeof (uint32_t)) + return -1; /* must be 32bit rounded... */ + + n = data_len / sizeof (*ui); +@@ -85,7 +85,7 @@ static int try_extension (probe *pb, cha + do_snprintf (curr, end, "MPLS:"); + + for (i = 0; i < n; i++, ui++) { +- u_int32_t mpls = ntohl (*ui); ++ uint32_t mpls = ntohl (*ui); + + do_snprintf (curr, end, "%sL=%u,E=%u,S=%u,T=%u", + i ? "/" : "", diff --git a/package/traceroute/patches/patch-traceroute_mod-dccp_c b/package/traceroute/patches/patch-traceroute_mod-dccp_c new file mode 100644 index 000000000..18dcbedaf --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_mod-dccp_c @@ -0,0 +1,55 @@ +--- traceroute-2.0.19.orig/traceroute/mod-dccp.c 2012-11-19 16:51:53.000000000 +0100 ++++ traceroute-2.0.19/traceroute/mod-dccp.c 2013-12-29 20:01:35.000000000 +0100 +@@ -30,7 +30,7 @@ static unsigned int dest_port = 0; + static int raw_sk = -1; + static int last_ttl = 0; + +-static u_int8_t buf[1024]; /* enough, enough... */ ++static uint8_t buf[1024]; /* enough, enough... */ + static size_t csum_len = 0; + static struct dccp_hdr *dh = NULL; + static struct dccp_hdr_ext *dhe = NULL; +@@ -51,8 +51,8 @@ static int dccp_init (const sockaddr_any + int af = dest->sa.sa_family; + sockaddr_any src; + socklen_t len; +- u_int8_t *ptr; +- u_int16_t *lenp; ++ uint8_t *ptr; ++ uint16_t *lenp; + + + dest_addr = *dest; +@@ -117,10 +117,10 @@ static int dccp_init (const sockaddr_any + ptr += len; + } + +- lenp = (u_int16_t *) ptr; +- ptr += sizeof (u_int16_t); +- *((u_int16_t *) ptr) = htons ((u_int16_t) IPPROTO_DCCP); +- ptr += sizeof (u_int16_t); ++ lenp = (uint16_t *) ptr; ++ ptr += sizeof (uint16_t); ++ *((uint16_t *) ptr) = htons ((uint16_t) IPPROTO_DCCP); ++ ptr += sizeof (uint16_t); + + + /* Construct DCCP header */ +@@ -153,7 +153,7 @@ static int dccp_init (const sockaddr_any + if (csum_len > sizeof (buf)) + error ("impossible"); /* paranoia */ + +- len = ptr - (u_int8_t *) dh; ++ len = ptr - (uint8_t *) dh; + if (len & 0x03) error ("impossible"); /* as >>2 ... */ + + *lenp = htons (len); +@@ -232,7 +232,7 @@ static probe *dccp_check_reply (int sk, + char *buf, size_t len) { + probe *pb; + struct dccp_hdr *ndh = (struct dccp_hdr *) buf; +- u_int16_t sport, dport; ++ uint16_t sport, dport; + + + if (len < 8) return NULL; /* too short */ diff --git a/package/traceroute/patches/patch-traceroute_mod-icmp_c b/package/traceroute/patches/patch-traceroute_mod-icmp_c new file mode 100644 index 000000000..13852be0b --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_mod-icmp_c @@ -0,0 +1,22 @@ +--- traceroute-2.0.19.orig/traceroute/mod-icmp.c 2011-08-18 17:12:00.000000000 +0200 ++++ traceroute-2.0.19/traceroute/mod-icmp.c 2013-12-29 20:01:35.000000000 +0100 +@@ -20,8 +20,8 @@ + + + static sockaddr_any dest_addr = {{ 0, }, }; +-static u_int16_t seq = 1; +-static u_int16_t ident = 0; ++static uint16_t seq = 1; ++static uint16_t ident = 0; + + static char *data; + static size_t *length_p; +@@ -173,7 +173,7 @@ static probe *icmp_check_reply (int sk, + char *buf, size_t len) { + int af = dest_addr.sa.sa_family; + int type; +- u_int16_t recv_id, recv_seq; ++ uint16_t recv_id, recv_seq; + probe *pb; + + diff --git a/package/traceroute/patches/patch-traceroute_mod-tcp_c b/package/traceroute/patches/patch-traceroute_mod-tcp_c new file mode 100644 index 000000000..9327a1b86 --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_mod-tcp_c @@ -0,0 +1,126 @@ +--- traceroute-2.0.19.orig/traceroute/mod-tcp.c 2012-03-27 16:01:15.000000000 +0200 ++++ traceroute-2.0.19/traceroute/mod-tcp.c 2013-12-29 20:16:23.000000000 +0100 +@@ -18,6 +18,24 @@ + #include + #include + ++#if !defined(__GLIBC__) ++# define TCPOPT_EOL 0 ++# define TCPOPT_NOP 1 ++# define TCPOPT_MAXSEG 2 ++# define TCPOLEN_MAXSEG 4 ++# define TCPOPT_WINDOW 3 ++# define TCPOLEN_WINDOW 3 ++# define TCPOPT_SACK_PERMITTED 4 /* Experimental */ ++# define TCPOLEN_SACK_PERMITTED 2 ++# define TCPOPT_SACK 5 /* Experimental */ ++# define TCPOPT_TIMESTAMP 8 ++# define TCPOLEN_TIMESTAMP 10 ++# define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ ++ ++# define TCPOPT_TSTAMP_HDR \ ++ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) ++#endif ++ + + #include "traceroute.h" + +@@ -33,11 +51,11 @@ static unsigned int dest_port = 0; + static int raw_sk = -1; + static int last_ttl = 0; + +-static u_int8_t buf[1024]; /* enough, enough... */ ++static uint8_t buf[1024]; /* enough, enough... */ + static size_t csum_len = 0; + static struct tcphdr *th = NULL; + +-#define TH_FLAGS(TH) (((u_int8_t *) (TH))[13]) ++#define TH_FLAGS(TH) (((uint8_t *) (TH))[13]) + #define TH_FIN 0x01 + #define TH_SYN 0x02 + #define TH_RST 0x04 +@@ -164,7 +182,7 @@ static CLIF_option tcp_options[] = { + static int check_sysctl (const char *name) { + int fd, res; + char buf[sizeof (SYSCTL_PREFIX) + strlen (name) + 1]; +- u_int8_t ch; ++ uint8_t ch; + + strcpy (buf, SYSCTL_PREFIX); + strcat (buf, name); +@@ -191,8 +209,8 @@ static int tcp_init (const sockaddr_any + sockaddr_any src; + int mtu; + socklen_t len; +- u_int8_t *ptr; +- u_int16_t *lenp; ++ uint8_t *ptr; ++ uint16_t *lenp; + + + dest_addr = *dest; +@@ -286,10 +304,10 @@ static int tcp_init (const sockaddr_any + ptr += len; + } + +- lenp = (u_int16_t *) ptr; +- ptr += sizeof (u_int16_t); +- *((u_int16_t *) ptr) = htons ((u_int16_t) IPPROTO_TCP); +- ptr += sizeof (u_int16_t); ++ lenp = (uint16_t *) ptr; ++ ptr += sizeof (uint16_t); ++ *((uint16_t *) ptr) = htons ((uint16_t) IPPROTO_TCP); ++ ptr += sizeof (uint16_t); + + + /* Construct TCP header */ +@@ -309,13 +327,13 @@ static int tcp_init (const sockaddr_any + + /* Build TCP options */ + +- ptr = (u_int8_t *) (th + 1); ++ ptr = (uint8_t *) (th + 1); + + if (flags & TH_SYN) { + *ptr++ = TCPOPT_MAXSEG; /* 2 */ + *ptr++ = TCPOLEN_MAXSEG; /* 4 */ +- *((u_int16_t *) ptr) = htons (mss ? mss : mtu); +- ptr += sizeof (u_int16_t); ++ *((uint16_t *) ptr) = htons (mss ? mss : mtu); ++ ptr += sizeof (uint16_t); + } + + if (flags & FL_TSTAMP) { +@@ -330,10 +348,10 @@ static int tcp_init (const sockaddr_any + *ptr++ = TCPOPT_TIMESTAMP; /* 8 */ + *ptr++ = TCPOLEN_TIMESTAMP; /* 10 */ + +- *((u_int32_t *) ptr) = random_seq (); /* really! */ +- ptr += sizeof (u_int32_t); +- *((u_int32_t *) ptr) = (flags & TH_ACK) ? random_seq () : 0; +- ptr += sizeof (u_int32_t); ++ *((uint32_t *) ptr) = random_seq (); /* really! */ ++ ptr += sizeof (uint32_t); ++ *((uint32_t *) ptr) = (flags & TH_ACK) ? random_seq () : 0; ++ ptr += sizeof (uint32_t); + } + else if (flags & FL_SACK) { + *ptr++ = TCPOPT_NOP; /* 1 */ +@@ -355,7 +373,7 @@ static int tcp_init (const sockaddr_any + if (csum_len > sizeof (buf)) + error ("impossible"); /* paranoia */ + +- len = ptr - (u_int8_t *) th; ++ len = ptr - (uint8_t *) th; + if (len & 0x03) error ("impossible"); /* as >>2 ... */ + + *lenp = htons (len); +@@ -436,7 +454,7 @@ static probe *tcp_check_reply (int sk, i + char *buf, size_t len) { + probe *pb; + struct tcphdr *tcp = (struct tcphdr *) buf; +- u_int16_t sport, dport; ++ uint16_t sport, dport; + + + if (len < 8) return NULL; /* too short */ diff --git a/package/traceroute/patches/patch-traceroute_mod-udp_c b/package/traceroute/patches/patch-traceroute_mod-udp_c new file mode 100644 index 000000000..1fcbf8b2b --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_mod-udp_c @@ -0,0 +1,20 @@ +--- traceroute-2.0.19.orig/traceroute/mod-udp.c 2010-12-14 16:51:44.000000000 +0100 ++++ traceroute-2.0.19/traceroute/mod-udp.c 2013-12-29 20:01:35.000000000 +0100 +@@ -71,7 +71,7 @@ static int udp_init (const sockaddr_any + dest_addr = *dest; + + if (!port_seq) port_seq = DEF_UDP_PORT; +- dest_addr.sin.sin_port = htons ((u_int16_t) port_seq); ++ dest_addr.sin.sin_port = htons ((uint16_t) port_seq); + + fill_data (packet_len_p); + +@@ -107,7 +107,7 @@ static int udplite_init (const sockaddr_ + dest_addr = *dest; + + if (!port_seq) port_seq = DEF_UDP_PORT; /* XXX: Hmmm... */ +- dest_addr.sin.sin_port = htons ((u_int16_t) port_seq); ++ dest_addr.sin.sin_port = htons ((uint16_t) port_seq); + + protocol = IPPROTO_UDPLITE; + diff --git a/package/traceroute/patches/patch-traceroute_traceroute_c b/package/traceroute/patches/patch-traceroute_traceroute_c new file mode 100644 index 000000000..b9b7f27d9 --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_traceroute_c @@ -0,0 +1,34 @@ +--- traceroute-2.0.19.orig/traceroute/traceroute.c 2012-11-19 17:12:04.000000000 +0100 ++++ traceroute-2.0.19/traceroute/traceroute.c 2013-12-30 11:22:50.000000000 +0100 +@@ -31,6 +31,13 @@ + #include "version.h" + #include "traceroute.h" + ++#ifndef AI_IDN ++# define AI_IDN 0 /* GNU/libc extension */ ++#endif ++ ++#ifndef NI_IDN ++# define NI_IDN 0 /* GNU/libc extension */ ++#endif + + #ifndef ICMP6_DST_UNREACH_BEYONDSCOPE + #ifdef ICMP6_DST_UNREACH_NOTNEIGHBOR +@@ -325,7 +332,7 @@ static void init_ip_options (void) { + rth->ip6r_type = ipv6_rthdr_type; + rth->ip6r_segleft = num_gateways; + +- *((u_int32_t *) (rth + 1)) = 0; ++ *((uint32_t *) (rth + 1)) = 0; + + in6 = (struct in6_addr *) (rtbuf + 8); + for (i = 0; i < num_gateways; i++) +@@ -606,7 +613,7 @@ int main (int argc, char *argv[]) { + htonl (((tos & 0xff) << 20) | (flow_label & 0x000fffff)); + + if (src_port) { +- src_addr.sin.sin_port = htons ((u_int16_t) src_port); ++ src_addr.sin.sin_port = htons ((uint16_t) src_port); + src_addr.sa.sa_family = af; + } + diff --git a/package/traceroute/patches/patch-traceroute_traceroute_h b/package/traceroute/patches/patch-traceroute_traceroute_h new file mode 100644 index 000000000..21efe3210 --- /dev/null +++ b/package/traceroute/patches/patch-traceroute_traceroute_h @@ -0,0 +1,11 @@ +--- traceroute-2.0.19.orig/traceroute/traceroute.h 2012-11-19 15:46:11.000000000 +0100 ++++ traceroute-2.0.19/traceroute/traceroute.h 2013-12-29 20:01:35.000000000 +0100 +@@ -92,7 +92,7 @@ const char *get_as_path (const char *que + int raw_can_connect (void); + + unsigned int random_seq (void); +-u_int16_t in_csum (const void *ptr, size_t len); ++uint16_t in_csum (const void *ptr, size_t len); + + + void tr_register_module (tr_module *module); -- cgit v1.2.3 From 1a8c5c6613b28a9c4afa7a8ce1f4d9ed09d39fda Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 30 Dec 2013 11:41:47 +0100 Subject: disable for uclibc --- package/traceroute/Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'package') diff --git a/package/traceroute/Makefile b/package/traceroute/Makefile index c908cc34d..64f1e1a48 100644 --- a/package/traceroute/Makefile +++ b/package/traceroute/Makefile @@ -12,6 +12,8 @@ PKG_SECTION:= net PKG_URL:= http://traceroute.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=traceroute/} +PKG_LIBC_DEPENDS:= eglibc glibc musl + include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,TRACEROUTE,traceroute,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -- cgit v1.2.3 From bc2f511c2392159717ea20a3a71a4b23de0ed134 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 1 Jan 2014 17:42:38 +0100 Subject: make native gcc for microblaze working --- package/gcc/Makefile | 9 +- package/gcc/patches/4.7.3/cflags.patch | 253 +++++++ package/gcc/patches/4.7.3/cross-gcc-fix.patch | 13 + package/gcc/patches/4.7.3/gcc-cppflags.patch | 12 + package/gcc/patches/4.7.3/ltmain.patch | 12 + package/gcc/patches/4.7.3/mirbsd-compat.patch | 12 + package/gcc/patches/4.7.3/musl-cris.patch | 11 + package/gcc/patches/4.7.3/musl-cross.patch | 825 +++++++++++++++++++++ package/gcc/patches/4.7.3/musl-m68k.patch | 11 + package/gcc/patches/4.7.3/musl-mips64.patch | 14 + package/gcc/patches/4.7.3/musl-ppc.patch | 155 ++++ package/gcc/patches/4.7.3/musl-sh.patch | 11 + package/gcc/patches/4.7.3/musl-sparc.patch | 24 + package/gcc/patches/4.7.3/sdt.patch | 14 + .../gcc/patches/4.8.2/patch-libatomic_Makefile_in | 12 + package/gcc/patches/cflags.patch | 253 ------- package/gcc/patches/cross-gcc-fix.patch | 13 - package/gcc/patches/gcc-cppflags.patch | 12 - package/gcc/patches/ltmain.patch | 12 - package/gcc/patches/mirbsd-compat.patch | 12 - package/gcc/patches/musl-cris.patch | 11 - package/gcc/patches/musl-cross.patch | 825 --------------------- package/gcc/patches/musl-m68k.patch | 11 - package/gcc/patches/musl-mips64.patch | 14 - package/gcc/patches/musl-ppc.patch | 155 ---- package/gcc/patches/musl-sh.patch | 11 - package/gcc/patches/musl-sparc.patch | 24 - package/gcc/patches/sdt.patch | 14 - package/glibc/files/libc.so.microblaze | 5 + 29 files changed, 1391 insertions(+), 1369 deletions(-) create mode 100644 package/gcc/patches/4.7.3/cflags.patch create mode 100644 package/gcc/patches/4.7.3/cross-gcc-fix.patch create mode 100644 package/gcc/patches/4.7.3/gcc-cppflags.patch create mode 100644 package/gcc/patches/4.7.3/ltmain.patch create mode 100644 package/gcc/patches/4.7.3/mirbsd-compat.patch create mode 100644 package/gcc/patches/4.7.3/musl-cris.patch create mode 100644 package/gcc/patches/4.7.3/musl-cross.patch create mode 100644 package/gcc/patches/4.7.3/musl-m68k.patch create mode 100644 package/gcc/patches/4.7.3/musl-mips64.patch create mode 100644 package/gcc/patches/4.7.3/musl-ppc.patch create mode 100644 package/gcc/patches/4.7.3/musl-sh.patch create mode 100644 package/gcc/patches/4.7.3/musl-sparc.patch create mode 100644 package/gcc/patches/4.7.3/sdt.patch create mode 100644 package/gcc/patches/4.8.2/patch-libatomic_Makefile_in delete mode 100644 package/gcc/patches/cflags.patch delete mode 100644 package/gcc/patches/cross-gcc-fix.patch delete mode 100644 package/gcc/patches/gcc-cppflags.patch delete mode 100644 package/gcc/patches/ltmain.patch delete mode 100644 package/gcc/patches/mirbsd-compat.patch delete mode 100644 package/gcc/patches/musl-cris.patch delete mode 100644 package/gcc/patches/musl-cross.patch delete mode 100644 package/gcc/patches/musl-m68k.patch delete mode 100644 package/gcc/patches/musl-mips64.patch delete mode 100644 package/gcc/patches/musl-ppc.patch delete mode 100644 package/gcc/patches/musl-sh.patch delete mode 100644 package/gcc/patches/musl-sparc.patch delete mode 100644 package/gcc/patches/sdt.patch create mode 100644 package/glibc/files/libc.so.microblaze (limited to 'package') diff --git a/package/gcc/Makefile b/package/gcc/Makefile index 2c2fb70a6..f0e17503a 100644 --- a/package/gcc/Makefile +++ b/package/gcc/Makefile @@ -8,7 +8,7 @@ PKG_NAME:= gcc PKG_DESCR:= GNU C compiler PKG_SECTION:= lang PKG_OPTS:= noremove -PKG_DEPENDS:= libmpc libgmp mpfr +PKG_DEPENDS:= libmpc libgmp mpfr libgcc PKG_BUILDDEP:= libmpc gmp mpfr PKG_ARCH_DEPENDS:= !avr32 @@ -37,6 +37,12 @@ ifeq ($(ADK_TARGET_SYSTEM_QEMU_MIPS64EL),y) CONFIGURE_ARGS+= --with-abi=$(ADK_TARGET_ABI) endif +ifeq ($(ADK_TOOLCHAIN_GCC_SJLJ),y) +CONFIGURE_ARGS+= --enable-sjlj-exceptions +else +CONFIGURE_ARGS+= --disable-sjlj-exceptions +endif + ifneq ($(ADK_PACKAGE_GXX),) CONFIGURE_ARGS+= --enable-languages=c,c++ else @@ -50,7 +56,6 @@ CONFIGURE_ARGS+= --host=$(REAL_GNU_TARGET_NAME) \ --without-headers \ --libexecdir=/usr/lib \ --disable-libssp \ - --disable-sjlj-exceptions \ --disable-biarch \ --disable-libmudflap \ --disable-libgomp \ diff --git a/package/gcc/patches/4.7.3/cflags.patch b/package/gcc/patches/4.7.3/cflags.patch new file mode 100644 index 000000000..3623d3872 --- /dev/null +++ b/package/gcc/patches/4.7.3/cflags.patch @@ -0,0 +1,253 @@ + + This patch brings over a few features from MirBSD: + * -fhonour-copts + If this option is not given, it's warned (depending + on environment variables). This is to catch errors + of misbuilt packages which override CFLAGS themselves. + * -Werror-maybe-reset + Has the effect of -Wno-error if GCC_NO_WERROR is + set and not '0', a no-operation otherwise. This is + to be able to use -Werror in "make" but prevent + GNU autoconf generated configure scripts from + freaking out. + * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks + the default for -O2/-Os, because they trigger gcc bugs + and can delete code with security implications. + + This patch was authored by Thorsten Glaser + with copyright assignment to the FSF in effect. + +--- a/gcc/c-family/c-opts.c ++++ b/gcc/c-family/c-opts.c +@@ -103,6 +103,9 @@ static size_t deferred_count; + /* Number of deferred options scanned for -include. */ + static size_t include_cursor; + ++/* Check if a port honours COPTS. */ ++static int honour_copts = 0; ++ + static void handle_OPT_d (const char *); + static void set_std_cxx98 (int); + static void set_std_cxx0x (int); +@@ -441,6 +444,9 @@ c_common_handle_option (size_t scode, co + global_dc->warning_as_error_requested = value; + break; + ++ case OPT_Werror_maybe_reset: ++ break; ++ + case OPT_Wformat: + set_Wformat (value); + break; +@@ -584,6 +590,12 @@ c_common_handle_option (size_t scode, co + flag_no_builtin = !value; + break; + ++ case OPT_fhonour_copts: ++ if (c_language == clk_c) { ++ honour_copts++; ++ } ++ break; ++ + case OPT_fconstant_string_class_: + constant_string_class_name = arg; + break; +@@ -1058,6 +1070,47 @@ c_common_init (void) + return false; + } + ++ if (c_language == clk_c) { ++ char *ev = getenv ("GCC_HONOUR_COPTS"); ++ int evv; ++ if (ev == NULL) ++ evv = -1; ++ else if ((*ev == '0') || (*ev == '\0')) ++ evv = 0; ++ else if (*ev == '1') ++ evv = 1; ++ else if (*ev == '2') ++ evv = 2; ++ else if (*ev == 's') ++ evv = -1; ++ else { ++ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); ++ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ ++ } ++ if (evv == 1) { ++ if (honour_copts == 0) { ++ error ("someone does not honour COPTS at all in lenient mode"); ++ return false; ++ } else if (honour_copts != 1) { ++ warning (0, "someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ } ++ } else if (evv == 2) { ++ if (honour_copts == 0) { ++ error ("someone does not honour COPTS at all in strict mode"); ++ return false; ++ } else if (honour_copts != 1) { ++ error ("someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ return false; ++ } ++ } else if (evv == 0) { ++ if (honour_copts != 1) ++ inform (0, "someone does not honour COPTS correctly, passed %d times", ++ honour_copts); ++ } ++ } ++ + return true; + } + +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -363,6 +363,10 @@ Werror-implicit-function-declaration + C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration) + This switch is deprecated; use -Werror=implicit-function-declaration instead + ++Werror-maybe-reset ++C ObjC C++ ObjC++ ++; Documented in common.opt ++ + Wfloat-equal + C ObjC C++ ObjC++ Var(warn_float_equal) Warning + Warn if testing floating point numbers for equality +@@ -794,6 +798,9 @@ C++ ObjC++ Optimization Alias(fexception + fhonor-std + C++ ObjC++ Ignore Warn(switch %qs is no longer supported) + ++fhonour-copts ++C ObjC C++ ObjC++ RejectNegative ++ + fhosted + C ObjC + Assume normal C execution environment +--- a/gcc/common.opt ++++ b/gcc/common.opt +@@ -520,6 +520,10 @@ Werror= + Common Joined + Treat specified warning as error + ++Werror-maybe-reset ++Common ++If environment variable GCC_NO_WERROR is set, act as -Wno-error ++ + Wextra + Common Var(extra_warnings) Warning + Print extra (possibly unwanted) warnings +@@ -1156,6 +1160,9 @@ fguess-branch-probability + Common Report Var(flag_guess_branch_prob) Optimization + Enable guessing of branch probabilities + ++fhonour-copts ++Common RejectNegative ++ + ; Nonzero means ignore `#ident' directives. 0 means handle them. + ; Generate position-independent code for executables if possible + ; On SVR4 targets, it also controls whether or not to emit a +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -477,8 +477,6 @@ static const struct default_options defa + { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 }, + #endif + { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 }, +- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, +- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, + { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 }, + { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, + { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, +@@ -494,6 +492,8 @@ static const struct default_options defa + { OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 }, + + /* -O3 optimizations. */ ++ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 }, ++ { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 }, + { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, + { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 }, + /* Inlining of functions reducing size is a good idea with -Os +@@ -1399,6 +1399,17 @@ common_handle_option (struct gcc_options + opts, opts_set, loc, dc); + break; + ++ case OPT_Werror_maybe_reset: ++ { ++ char *ev = getenv ("GCC_NO_WERROR"); ++ if ((ev != NULL) && (*ev != '0')) ++ warnings_are_errors = 0; ++ } ++ break; ++ ++ case OPT_fhonour_copts: ++ break; ++ + case OPT_Wlarger_than_: + opts->x_larger_than_size = value; + opts->x_warn_larger_than = value != -1; +--- a/gcc/doc/cppopts.texi ++++ b/gcc/doc/cppopts.texi +@@ -164,6 +164,11 @@ in older programs. This warning is on b + Make all warnings into hard errors. Source code which triggers warnings + will be rejected. + ++ at item -Werror-maybe-reset ++ at opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ + @item -Wsystem-headers + @opindex Wsystem-headers + Issue warnings for code in system headers. These are normally unhelpful +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -240,7 +240,7 @@ Objective-C and Objective-C++ Dialects}. + -Wconversion -Wcoverage-mismatch -Wno-cpp -Wno-deprecated @gol + -Wno-deprecated-declarations -Wdisabled-optimization @gol + -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol +--Wno-endif-labels -Werror -Werror=* @gol ++-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol + -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol + -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol + -Wformat-security -Wformat-y2k @gol +@@ -4497,6 +4497,22 @@ This option is only supported for C and + @option{-Wall} and by @option{-pedantic}, which can be disabled with + @option{-Wno-pointer-sign}. + ++ at item -Werror-maybe-reset ++ at opindex Werror-maybe-reset ++Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment ++variable is set to anything other than 0 or empty. ++ ++ at item -fhonour-copts ++ at opindex fhonour-copts ++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not ++given at least once, and warn if it is given more than once. ++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not ++given exactly once. ++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option ++is not given exactly once. ++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. ++This flag and environment variable only affect the C language. ++ + @item -Wstack-protector + @opindex Wstack-protector + @opindex Wno-stack-protector +@@ -6319,7 +6335,7 @@ so, the first branch is redirected to ei + second branch or a point immediately following it, depending on whether + the condition is known to be true or false. + +-Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. ++Enabled at levels @option{-O3}. + + @item -fsplit-wide-types + @opindex fsplit-wide-types +--- a/gcc/java/jvspec.c ++++ b/gcc/java/jvspec.c +@@ -627,6 +627,7 @@ lang_specific_pre_link (void) + class name. Append dummy `.c' that can be stripped by set_input so %b + is correct. */ + set_input (concat (main_class_name, "main.c", NULL)); ++ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ + err = do_spec (jvgenmain_spec); + if (err == 0) + { diff --git a/package/gcc/patches/4.7.3/cross-gcc-fix.patch b/package/gcc/patches/4.7.3/cross-gcc-fix.patch new file mode 100644 index 000000000..f39b35fb9 --- /dev/null +++ b/package/gcc/patches/4.7.3/cross-gcc-fix.patch @@ -0,0 +1,13 @@ +diff -Nur gcc-4.4.2.orig/gcc/Makefile.in gcc-4.4.2/gcc/Makefile.in +--- gcc-4.5.2.orig/gcc/Makefile.in 2010-09-02 15:05:30.000000000 +0200 ++++ gcc-4.5.2/gcc/Makefile.in 2011-01-15 14:29:18.000000000 +0100 +@@ -980,7 +980,8 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $ + # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro + # puts -I options in CPPFLAGS, our include files in the srcdir will always + # win against random include files in /usr/include. +-ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) ++#ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) ++ALL_CPPFLAGS = $(INCLUDES) + + # This is the variable to use when using $(COMPILER). + ifneq ($(ENABLE_BUILD_WITH_CXX),yes) diff --git a/package/gcc/patches/4.7.3/gcc-cppflags.patch b/package/gcc/patches/4.7.3/gcc-cppflags.patch new file mode 100644 index 000000000..0971bbec9 --- /dev/null +++ b/package/gcc/patches/4.7.3/gcc-cppflags.patch @@ -0,0 +1,12 @@ +diff -Nur gcc-4.4.4.orig/gcc/configure gcc-4.4.4/gcc/configure +--- gcc-4.4.4.orig/gcc/configure 2009-10-19 14:15:27.000000000 +0200 ++++ gcc-4.4.4/gcc/configure 2010-08-02 00:47:36.823620346 +0200 +@@ -13530,7 +13530,7 @@ + esac + saved_CFLAGS="${CFLAGS}" + CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ +- LDFLAGS="${LDFLAGS_FOR_BUILD}" \ ++ LDFLAGS="${LDFLAGS_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \ + ${realsrcdir}/configure \ + --enable-languages=${enable_languages-all} \ + --target=$target_alias --host=$build_alias --build=$build_alias diff --git a/package/gcc/patches/4.7.3/ltmain.patch b/package/gcc/patches/4.7.3/ltmain.patch new file mode 100644 index 000000000..215889b70 --- /dev/null +++ b/package/gcc/patches/4.7.3/ltmain.patch @@ -0,0 +1,12 @@ +diff -Nur gcc-4.5.2.orig/ltmain.sh gcc-4.5.2/ltmain.sh +--- gcc-4.5.2.orig/ltmain.sh 2009-12-05 18:18:53.000000000 +0100 ++++ gcc-4.5.2/ltmain.sh 2011-01-15 14:45:07.000000000 +0100 +@@ -4980,7 +4980,7 @@ + # @file GCC response files + # -tp=* Portland pgcc target processor selection + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ +- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) ++ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" diff --git a/package/gcc/patches/4.7.3/mirbsd-compat.patch b/package/gcc/patches/4.7.3/mirbsd-compat.patch new file mode 100644 index 000000000..2f3ea0c87 --- /dev/null +++ b/package/gcc/patches/4.7.3/mirbsd-compat.patch @@ -0,0 +1,12 @@ +diff -Nur gcc-4.4.2.orig/gcc/configure gcc-4.4.2/gcc/configure +--- gcc-4.4.2.orig/gcc/configure Tue Mar 24 18:45:39 2009 ++++ gcc-4.4.2/gcc/configure Sat Dec 19 21:07:07 2009 +@@ -19381,7 +19381,7 @@ + dynamic_linker='ldqnx.so' + ;; + +-openbsd*) ++mirbsd*|openbsd*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no diff --git a/package/gcc/patches/4.7.3/musl-cris.patch b/package/gcc/patches/4.7.3/musl-cris.patch new file mode 100644 index 000000000..4889263a1 --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-cris.patch @@ -0,0 +1,11 @@ +diff -Nur gcc-4.7.3.orig/gcc/config/cris/linux.h gcc-4.7.3/gcc/config/cris/linux.h +--- gcc-4.7.3.orig/gcc/config/cris/linux.h 2011-04-11 20:46:05.000000000 +0200 ++++ gcc-4.7.3/gcc/config/cris/linux.h 2013-10-11 10:01:51.000000000 +0200 +@@ -104,6 +104,7 @@ + #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-cris.1" + + #undef CRIS_LINK_SUBTARGET_SPEC + #define CRIS_LINK_SUBTARGET_SPEC \ diff --git a/package/gcc/patches/4.7.3/musl-cross.patch b/package/gcc/patches/4.7.3/musl-cross.patch new file mode 100644 index 000000000..453ba9aec --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-cross.patch @@ -0,0 +1,825 @@ +diff -Nur gcc-4.7.3.orig/config.sub gcc-4.7.3/config.sub +--- gcc-4.7.3.orig/config.sub 2012-08-06 16:34:27.000000000 +0200 ++++ gcc-4.7.3/config.sub 2013-09-16 15:39:42.000000000 +0200 +@@ -4,7 +4,7 @@ + # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + # 2011 Free Software Foundation, Inc. + +-timestamp='2011-10-29' ++timestamp='2011-03-23' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -125,6 +125,7 @@ + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ ++ linux-musl* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ +@@ -251,17 +252,13 @@ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ +- | be32 | be64 \ + | bfin \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ +- | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ +- | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ +- | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ +@@ -295,7 +292,7 @@ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ +- | rl78 | rx \ ++ | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +@@ -304,7 +301,7 @@ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ +- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ ++ | v850 | v850e \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) +@@ -361,7 +358,6 @@ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ +- | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | clipper-* | craynv-* | cydra-* \ +@@ -370,10 +366,8 @@ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ +- | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ +- | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +@@ -407,7 +401,7 @@ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ +- | rl78-* | romp-* | rs6000-* | rx-* \ ++ | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ +@@ -415,11 +409,10 @@ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ +- | tile*-* \ ++ | tile-* | tilegx-* \ + | tron-* \ + | ubicom32-* \ +- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ +- | vax-* \ ++ | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ +@@ -820,10 +813,6 @@ + basic_machine=i370-ibm + os=-mvs + ;; +- nacl) +- basic_machine=le32-unknown +- os=-nacl +- ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 +@@ -1132,8 +1121,13 @@ + basic_machine=t90-cray + os=-unicos + ;; ++ # This must be matched before tile*. ++ tilegx*) ++ basic_machine=tilegx-unknown ++ os=-linux-gnu ++ ;; + tile*) +- basic_machine=$basic_machine-unknown ++ basic_machine=tile-unknown + os=-linux-gnu + ;; + tx39) +@@ -1346,6 +1340,7 @@ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ ++ | -linux-musl* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ +diff -Nur gcc-4.7.3.orig/fixincludes/mkfixinc.sh gcc-4.7.3/fixincludes/mkfixinc.sh +--- gcc-4.7.3.orig/fixincludes/mkfixinc.sh 2011-09-22 16:00:17.000000000 +0200 ++++ gcc-4.7.3/fixincludes/mkfixinc.sh 2013-09-16 15:39:42.000000000 +0200 +@@ -20,7 +20,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} +diff -Nur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h +--- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100 ++++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2013-09-16 15:39:42.000000000 +0200 +@@ -64,6 +64,23 @@ + #undef GLIBC_DYNAMIC_LINKER + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" + ++/* For ARM musl currently supports two dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI. ++ musl does not support the legacy OABI (i.e. broken) mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, but this can be overridden by changing both ++ MUSL_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-musl-arm.so.1" ++#define MUSL_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-musl-armhf.so.1" ++#define MUSL_DYNAMIC_LINKER_DEFAULT MUSL_DYNAMIC_LINKER_SOFT_FLOAT ++ ++#define MUSL_DYNAMIC_LINKER \ ++ "%{mfloat-abi=hard:" MUSL_DYNAMIC_LINKER_HARD_FLOAT "} \ ++ %{mfloat-abi=soft*:" MUSL_DYNAMIC_LINKER_SOFT_FLOAT "} \ ++ %{!mfloat-abi=*:" MUSL_DYNAMIC_LINKER_DEFAULT "}" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h +--- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200 ++++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-09-16 15:39:42.000000000 +0200 +@@ -31,3 +31,7 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" +diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux.h gcc-4.7.3/gcc/config/i386/linux.h +--- gcc-4.7.3.orig/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200 ++++ gcc-4.7.3/gcc/config/i386/linux.h 2013-09-16 15:39:42.000000000 +0200 +@@ -22,3 +22,4 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +diff -Nur gcc-4.7.3.orig/gcc/config/linux.h gcc-4.7.3/gcc/config/linux.h +--- gcc-4.7.3.orig/gcc/config/linux.h 2012-08-14 15:59:04.000000000 +0200 ++++ gcc-4.7.3/gcc/config/linux.h 2013-09-16 15:39:42.000000000 +0200 +@@ -33,10 +33,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -54,18 +56,21 @@ + uClibc or Bionic is the default C library and whether + -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -85,21 +90,21 @@ + + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) + + /* Determine whether the entire c99 runtime + is present in the runtime library. */ + #undef TARGET_C99_FUNCTIONS +-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) ++#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL) + + /* Whether we have sincos that follows the GNU extension. */ + #undef TARGET_HAS_SINCOS +@@ -108,3 +113,74 @@ + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) ++ ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif +diff -Nur gcc-4.7.3.orig/gcc/config/linux.opt gcc-4.7.3/gcc/config/linux.opt +--- gcc-4.7.3.orig/gcc/config/linux.opt 2010-09-29 16:51:52.000000000 +0200 ++++ gcc-4.7.3/gcc/config/linux.opt 2013-09-16 15:39:42.000000000 +0200 +@@ -30,3 +30,7 @@ + muclibc + Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) ++Use musl C library +diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux.h gcc-4.7.3/gcc/config/mips/linux.h +--- gcc-4.7.3.orig/gcc/config/mips/linux.h 2011-07-19 20:00:27.000000000 +0200 ++++ gcc-4.7.3/gcc/config/mips/linux.h 2013-09-16 15:39:43.000000000 +0200 +@@ -19,3 +19,5 @@ + . */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1" +diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/linux64.h gcc-4.7.3/gcc/config/rs6000/linux64.h +--- gcc-4.7.3.orig/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100 ++++ gcc-4.7.3/gcc/config/rs6000/linux64.h 2013-09-16 15:39:43.000000000 +0200 +@@ -362,17 +362,21 @@ + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + + #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ +diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h gcc-4.7.3/gcc/config/rs6000/sysv4.h +--- gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h 2012-04-30 19:39:01.000000000 +0200 ++++ gcc-4.7.3/gcc/config/rs6000/sysv4.h 2013-09-16 15:39:43.000000000 +0200 +@@ -804,15 +808,18 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +diff -Nur gcc-4.7.3.orig/gcc/config.gcc gcc-4.7.3/gcc/config.gcc +--- gcc-4.7.3.orig/gcc/config.gcc 2013-03-06 23:54:11.000000000 +0100 ++++ gcc-4.7.3/gcc/config.gcc 2013-09-16 15:39:43.000000000 +0200 +@@ -522,7 +522,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # Common parts for widely ported systems. + case ${target} in +@@ -625,6 +625,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +@@ -2092,6 +2095,10 @@ + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +diff -Nur gcc-4.7.3.orig/gcc/configure gcc-4.7.3/gcc/configure +--- gcc-4.7.3.orig/gcc/configure 2013-02-06 16:23:55.000000000 +0100 ++++ gcc-4.7.3/gcc/configure 2013-09-16 15:39:43.000000000 +0200 +@@ -26815,7 +26815,8 @@ + gcc_cv_libc_provides_ssp=yes + fi + ;; +- *-*-gnu*) ++ *-*-gnu* | \ ++ *-linux-musl*) + # Avoid complicated tests (see + # ) and for now + # simply assert that glibc does provide this, which is true for all +@@ -26902,6 +26903,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +diff -Nur gcc-4.7.3.orig/gcc/configure.ac gcc-4.7.3/gcc/configure.ac +--- gcc-4.7.3.orig/gcc/configure.ac 2013-02-06 16:23:55.000000000 +0100 ++++ gcc-4.7.3/gcc/configure.ac 2013-09-16 15:39:43.000000000 +0200 +@@ -4692,7 +4692,8 @@ + gcc_cv_libc_provides_ssp=yes + fi] + ;; +- *-*-gnu*) ++ *-*-gnu* | \ ++ *-linux-musl*) + # Avoid complicated tests (see + # ) and for now + # simply assert that glibc does provide this, which is true for all +@@ -4762,6 +4763,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +diff -Nur gcc-4.7.3.orig/gcc/ginclude/stddef.h gcc-4.7.3/gcc/ginclude/stddef.h +--- gcc-4.7.3.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100 ++++ gcc-4.7.3/gcc/ginclude/stddef.h 2013-09-16 15:39:43.000000000 +0200 +@@ -184,6 +184,7 @@ + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -200,6 +201,7 @@ + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__FreeBSD_kernel__) + /* __size_t is a typedef on FreeBSD 5, must not trash it. */ +@@ -215,6 +217,7 @@ + typedef long ssize_t; + #endif /* __BEOS__ */ + #endif /* !(defined (__GNUG__) && defined (size_t)) */ ++#endif /* __DEFINED_size_t */ + #endif /* __size_t */ + #endif /* _SIZET_ */ + #endif /* _GCC_SIZE_T */ +diff -Nur gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c +--- gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c 2012-10-06 23:55:06.000000000 +0200 ++++ gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c 2013-09-16 15:39:43.000000000 +0200 +@@ -47,28 +47,13 @@ + #include "unwind-compat.h" + #include "gthr.h" + +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ +- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(__FreeBSD__) && __FreeBSD__ >= 7 +-# define ElfW __ElfN +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(__OpenBSD__) +-# define ElfW(type) Elf_##type +-# define USE_PT_GNU_EH_FRAME +-#endif +- +-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ +- && defined(TARGET_DL_ITERATE_PHDR) \ +- && defined(__sun__) && defined(__svr4__) ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) + # define USE_PT_GNU_EH_FRAME ++# ifdef __OpenBSD__ ++# define ElfW(type) Elf_##typ ++# elif defined(__FreeBSD__) && __FreeBSD__ >= 7 ++# define ElfW __ElfN ++# endif + #endif + + #if defined(USE_PT_GNU_EH_FRAME) +diff -Nur gcc-4.7.3.orig/libgomp/config/posix/time.c gcc-4.7.3/libgomp/config/posix/time.c +--- gcc-4.7.3.orig/libgomp/config/posix/time.c 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.7.3/libgomp/config/posix/time.c 2013-09-16 15:39:43.000000000 +0200 +@@ -28,6 +28,8 @@ + The following implementation uses the most simple POSIX routines. + If present, POSIX 4 clocks should be used instead. */ + ++#define _POSIX_C_SOURCE 199309L /* for clocks */ ++ + #include "libgomp.h" + #include + #if TIME_WITH_SYS_TIME +diff -Nur gcc-4.7.3.orig/libitm/config/arm/hwcap.cc gcc-4.7.3/libitm/config/arm/hwcap.cc +--- gcc-4.7.3.orig/libitm/config/arm/hwcap.cc 2011-12-15 04:24:05.000000000 +0100 ++++ gcc-4.7.3/libitm/config/arm/hwcap.cc 2013-09-16 15:39:43.000000000 +0200 +@@ -40,7 +40,11 @@ + + #ifdef __linux__ + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#endif + #include + + static void __attribute__((constructor)) +diff -Nur gcc-4.7.3.orig/libitm/config/linux/x86/tls.h gcc-4.7.3/libitm/config/linux/x86/tls.h +--- gcc-4.7.3.orig/libitm/config/linux/x86/tls.h 2011-11-08 12:13:41.000000000 +0100 ++++ gcc-4.7.3/libitm/config/linux/x86/tls.h 2013-09-16 15:39:43.000000000 +0200 +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H +diff -Nur gcc-4.7.3.orig/libssp/configure gcc-4.7.3/libssp/configure +--- gcc-4.7.3.orig/libssp/configure 2012-08-06 16:34:27.000000000 +0200 ++++ gcc-4.7.3/libssp/configure 2013-09-16 15:39:43.000000000 +0200 +@@ -626,6 +626,8 @@ + ssp_have_usable_vsnprintf + EGREP + GREP ++LIBSSP_IN_LIBC_FALSE ++LIBSSP_IN_LIBC_TRUE + LIBSSP_USE_SYMVER_SUN_FALSE + LIBSSP_USE_SYMVER_SUN_TRUE + LIBSSP_USE_SYMVER_GNU_FALSE +@@ -735,6 +737,7 @@ + enable_multilib + enable_dependency_tracking + enable_symvers ++enable_ssp_in_libc + enable_shared + enable_static + with_pic +@@ -1374,6 +1377,7 @@ + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-symvers disable symbol versioning for libssp ++ --enable-ssp-in-libc do not build SSP, as it is in libc + --enable-shared[=PKGS] build shared libraries [default=yes] + --enable-static[=PKGS] build static libraries [default=yes] + --enable-fast-install[=PKGS] +@@ -4206,6 +4210,36 @@ + fi + + ++# musl provides libssp in libc ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libssp is provided in libc" >&5 ++$as_echo_n "checking whether libssp is provided in libc... " >&6; } ++# Check whether --enable-ssp_in_libc was given. ++if test "${enable_ssp_in_libc+set}" = set; then : ++ enableval=$enable_ssp_in_libc; ssp_in_libc=$enableval ++else ++ ssp_in_libc=check ++fi ++ ++if test "x$ssp_in_libc" = "xcheck"; then ++ case "$host" in ++ *-musl*) ++ ssp_in_libc=yes ++ ;; ++ ++ *) ++ ssp_in_libc=no ++ ;; ++ esac ++fi ++ if test "x$ssp_in_libc" = xyes; then ++ LIBSSP_IN_LIBC_TRUE= ++ LIBSSP_IN_LIBC_FALSE='#' ++else ++ LIBSSP_IN_LIBC_TRUE='#' ++ LIBSSP_IN_LIBC_FALSE= ++fi ++ ++ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 + $as_echo_n "checking for grep that handles long lines and -e... " >&6; } +@@ -10650,7 +10684,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10653 "configure" ++#line 10687 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10756,7 +10790,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10759 "configure" ++#line 10793 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11185,6 +11219,10 @@ + as_fn_error "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined. + Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi ++if test -z "${LIBSSP_IN_LIBC_TRUE}" && test -z "${LIBSSP_IN_LIBC_FALSE}"; then ++ as_fn_error "conditional \"LIBSSP_IN_LIBC\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + + : ${CONFIG_STATUS=./config.status} + ac_write_fail=0 +diff -Nur gcc-4.7.3.orig/libssp/configure.ac gcc-4.7.3/libssp/configure.ac +--- gcc-4.7.3.orig/libssp/configure.ac 2012-05-31 20:59:34.000000000 +0200 ++++ gcc-4.7.3/libssp/configure.ac 2013-09-16 15:39:43.000000000 +0200 +@@ -114,6 +114,26 @@ + AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu]) + AM_CONDITIONAL(LIBSSP_USE_SYMVER_SUN, [test "x$ssp_use_symver" = xsun]) + ++# musl provides libssp in libc ++AC_MSG_CHECKING([whether libssp is provided in libc]) ++AC_ARG_ENABLE(ssp_in_libc, ++AC_HELP_STRING([--enable-ssp-in-libc], ++ [do not build SSP, as it is in libc]), ++ssp_in_libc=$enableval, ++ssp_in_libc=check) ++if test "x$ssp_in_libc" = "xcheck"; then ++ case "$host" in ++ *-musl*) ++ ssp_in_libc=yes ++ ;; ++ ++ *) ++ ssp_in_libc=no ++ ;; ++ esac ++fi ++AM_CONDITIONAL(LIBSSP_IN_LIBC, [test "x$ssp_in_libc" = xyes]) ++ + AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h) + + if test x$gcc_no_link = xyes; then +diff -Nur gcc-4.7.3.orig/libssp/Makefile.am gcc-4.7.3/libssp/Makefile.am +--- gcc-4.7.3.orig/libssp/Makefile.am 2010-12-06 01:50:04.000000000 +0100 ++++ gcc-4.7.3/libssp/Makefile.am 2013-09-16 15:39:43.000000000 +0200 +@@ -36,7 +36,11 @@ + + AM_CFLAGS = -Wall + ++if LIBSSP_IN_LIBC ++toolexeclib_LTLIBRARIES = libssp_nonshared.la ++else + toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la ++endif + + target_noncanonical = @target_noncanonical@ + libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include +diff -Nur gcc-4.7.3.orig/libssp/Makefile.in gcc-4.7.3/libssp/Makefile.in +--- gcc-4.7.3.orig/libssp/Makefile.in 2011-02-13 12:45:53.000000000 +0100 ++++ gcc-4.7.3/libssp/Makefile.in 2013-09-16 15:39:43.000000000 +0200 +@@ -93,12 +93,17 @@ + libssp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libssp_la_LDFLAGS) $(LDFLAGS) -o $@ ++@LIBSSP_IN_LIBC_FALSE@am_libssp_la_rpath = -rpath $(toolexeclibdir) + am_libssp_nonshared_la_OBJECTS = libssp_nonshared_la-ssp-local.lo + libssp_nonshared_la_OBJECTS = $(am_libssp_nonshared_la_OBJECTS) + libssp_nonshared_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libssp_nonshared_la_CFLAGS) $(CFLAGS) \ + $(libssp_nonshared_la_LDFLAGS) $(LDFLAGS) -o $@ ++@LIBSSP_IN_LIBC_FALSE@am_libssp_nonshared_la_rpath = -rpath \ ++@LIBSSP_IN_LIBC_FALSE@ $(toolexeclibdir) ++@LIBSSP_IN_LIBC_TRUE@am_libssp_nonshared_la_rpath = -rpath \ ++@LIBSSP_IN_LIBC_TRUE@ $(toolexeclibdir) + DEFAULT_INCLUDES = -I.@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/../depcomp + am__depfiles_maybe = depfiles +@@ -258,7 +263,8 @@ + @LIBSSP_USE_SYMVER_GNU_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = $(srcdir)/ssp.map + @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = ssp.map-sun + AM_CFLAGS = -Wall +-toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la ++@LIBSSP_IN_LIBC_FALSE@toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la ++@LIBSSP_IN_LIBC_TRUE@toolexeclib_LTLIBRARIES = libssp_nonshared.la + libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include + nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h + libssp_la_SOURCES = \ +@@ -414,9 +420,9 @@ + rm -f "$${dir}/so_locations"; \ + done + libssp.la: $(libssp_la_OBJECTS) $(libssp_la_DEPENDENCIES) +- $(libssp_la_LINK) -rpath $(toolexeclibdir) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS) ++ $(libssp_la_LINK) $(am_libssp_la_rpath) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS) + libssp_nonshared.la: $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_DEPENDENCIES) +- $(libssp_nonshared_la_LINK) -rpath $(toolexeclibdir) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS) ++ $(libssp_nonshared_la_LINK) $(am_libssp_nonshared_la_rpath) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +diff -Nur gcc-4.7.3.orig/libstdc++-v3/configure.host gcc-4.7.3/libstdc++-v3/configure.host +--- gcc-4.7.3.orig/libstdc++-v3/configure.host 2012-12-18 15:27:14.000000000 +0100 ++++ gcc-4.7.3/libstdc++-v3/configure.host 2013-09-16 15:39:43.000000000 +0200 +@@ -243,6 +243,13 @@ + os_include_dir="os/bsd/freebsd" + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ # check for musl by target ++ case "${host_os}" in ++ *-musl*) ++ os_include_dir="os/generic" ++ ;; ++ *) ++ + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then +@@ -251,6 +258,9 @@ + os_include_dir="os/gnu-linux" + fi + ;; ++ ++ esac ++ ;; + hpux*) + os_include_dir="os/hpux" + ;; diff --git a/package/gcc/patches/4.7.3/musl-m68k.patch b/package/gcc/patches/4.7.3/musl-m68k.patch new file mode 100644 index 000000000..54c7e0eef --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-m68k.patch @@ -0,0 +1,11 @@ +diff -Nur gcc-4.7.3.orig/gcc/config/m68k/linux.h gcc-4.7.3/gcc/config/m68k/linux.h +--- gcc-4.7.3.orig/gcc/config/m68k/linux.h 2011-11-27 00:57:37.000000000 +0100 ++++ gcc-4.7.3/gcc/config/m68k/linux.h 2013-09-28 22:37:22.000000000 +0200 +@@ -73,6 +73,7 @@ + done. */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1" + + #undef LINK_SPEC + #define LINK_SPEC "-m m68kelf %{shared} \ diff --git a/package/gcc/patches/4.7.3/musl-mips64.patch b/package/gcc/patches/4.7.3/musl-mips64.patch new file mode 100644 index 000000000..671ba9f28 --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-mips64.patch @@ -0,0 +1,14 @@ +diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux64.h gcc-4.7.3/gcc/config/mips/linux64.h +--- gcc-4.7.3.orig/gcc/config/mips/linux64.h 2011-07-19 20:00:27.000000000 +0200 ++++ gcc-4.7.3/gcc/config/mips/linux64.h 2013-09-17 09:24:36.000000000 +0200 +@@ -28,6 +28,9 @@ + #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" + #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1" ++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/package/gcc/patches/4.7.3/musl-ppc.patch b/package/gcc/patches/4.7.3/musl-ppc.patch new file mode 100644 index 000000000..f4211ee73 --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-ppc.patch @@ -0,0 +1,155 @@ +diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h +--- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h 2011-11-12 18:20:58.000000000 +0100 ++++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h 2013-09-15 18:29:20.000000000 +0200 +@@ -27,7 +27,6 @@ + #define R_CR2 70 + #define R_VR0 77 + #define R_VRSAVE 109 +-#define R_VSCR 110 + + struct gcc_vregs + { +@@ -176,38 +175,6 @@ + } + #endif + +-/* Find an entry in the process auxiliary vector. The canonical way to +- test for VMX is to look at AT_HWCAP. */ +- +-static long +-ppc_linux_aux_vector (long which) +-{ +- /* __libc_stack_end holds the original stack passed to a process. */ +- extern long *__libc_stack_end; +- long argc; +- char **argv; +- char **envp; +- struct auxv +- { +- long a_type; +- long a_val; +- } *auxp; +- +- /* The Linux kernel puts argc first on the stack. */ +- argc = __libc_stack_end[0]; +- /* Followed by argv, NULL terminated. */ +- argv = (char **) __libc_stack_end + 1; +- /* Followed by environment string pointers, NULL terminated. */ +- envp = argv + argc + 1; +- while (*envp++) +- continue; +- /* Followed by the aux vector, zero terminated. */ +- for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp) +- if (auxp->a_type == which) +- return auxp->a_val; +- return 0; +-} +- + /* Do code reading to identify a signal frame, and set the frame + state data appropriately. See unwind-dw2.c for the structs. */ + +@@ -217,8 +184,8 @@ + ppc_fallback_frame_state (struct _Unwind_Context *context, + _Unwind_FrameState *fs) + { +- static long hwcap = 0; + struct gcc_regs *regs = get_regs (context); ++ struct gcc_vregs *vregs; + long new_cfa; + int i; + +@@ -230,12 +197,15 @@ + fs->regs.cfa_reg = STACK_POINTER_REGNUM; + fs->regs.cfa_offset = new_cfa - (long) context->cfa; + +- for (i = 0; i < 32; i++) +- if (i != STACK_POINTER_REGNUM) +- { +- fs->regs.reg[i].how = REG_SAVED_OFFSET; +- fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; +- } ++#ifdef __powerpc64__ ++ fs->regs.reg[2].how = REG_SAVED_OFFSET; ++ fs->regs.reg[2].loc.offset = (long) ®s->gpr[2] - new_cfa; ++#endif ++ for (i = 14; i < 32; i++) ++ { ++ fs->regs.reg[i].how = REG_SAVED_OFFSET; ++ fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; ++ } + + fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET; + /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit +@@ -251,57 +221,35 @@ + fs->retaddr_column = ARG_POINTER_REGNUM; + fs->signal_frame = 1; + +- if (hwcap == 0) ++ /* If we have a FPU... */ ++ for (i = 14; i < 32; i++) + { +- hwcap = ppc_linux_aux_vector (16); +- /* These will already be set if we found AT_HWCAP. A nonzero +- value stops us looking again if for some reason we couldn't +- find AT_HWCAP. */ +-#ifdef __powerpc64__ +- hwcap |= 0xc0000000; +-#else +- hwcap |= 0x80000000; +-#endif ++ fs->regs.reg[i + 32].how = REG_SAVED_OFFSET; ++ fs->regs.reg[i + 32].loc.offset = (long) ®s->fpr[i] - new_cfa; + } + +- /* If we have a FPU... */ +- if (hwcap & 0x08000000) +- for (i = 0; i < 32; i++) +- { +- fs->regs.reg[i + 32].how = REG_SAVED_OFFSET; +- fs->regs.reg[i + 32].loc.offset = (long) ®s->fpr[i] - new_cfa; +- } +- + /* If we have a VMX unit... */ +- if (hwcap & 0x10000000) +- { +- struct gcc_vregs *vregs; + #ifdef __powerpc64__ +- vregs = regs->vp; ++ vregs = regs->vp; + #else +- vregs = ®s->vregs; ++ vregs = ®s->vregs; + #endif +- if (regs->msr & (1 << 25)) ++ if (regs->msr & (1 << 25)) ++ { ++ for (i = 20; i < 32; i++) + { +- for (i = 0; i < 32; i++) +- { +- fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET; +- fs->regs.reg[i + R_VR0].loc.offset +- = (long) &vregs->vr[i] - new_cfa; +- } +- +- fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET; +- fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa; ++ fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET; ++ fs->regs.reg[i + R_VR0].loc.offset = (long) &vregs->vr[i] - new_cfa; + } +- +- fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET; +- fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa; + } + ++ fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET; ++ fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa; ++ + /* If we have SPE register high-parts... we check at compile-time to + avoid expanding the code for all other PowerPC. */ + #ifdef __SPE__ +- for (i = 0; i < 32; i++) ++ for (i = 14; i < 32; i++) + { + fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET; + fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset diff --git a/package/gcc/patches/4.7.3/musl-sh.patch b/package/gcc/patches/4.7.3/musl-sh.patch new file mode 100644 index 000000000..7738f266e --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-sh.patch @@ -0,0 +1,11 @@ +diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h +--- gcc-4.7.3.orig/gcc/config/sh/linux.h 2013-03-25 23:55:56.000000000 +0100 ++++ gcc-4.7.3/gcc/config/sh/linux.h 2013-09-26 21:16:39.000000000 +0200 +@@ -46,6 +46,7 @@ + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/package/gcc/patches/4.7.3/musl-sparc.patch b/package/gcc/patches/4.7.3/musl-sparc.patch new file mode 100644 index 000000000..228b8522d --- /dev/null +++ b/package/gcc/patches/4.7.3/musl-sparc.patch @@ -0,0 +1,24 @@ +diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/linux64.h +--- gcc-4.7.3.orig/gcc/config/sparc/linux64.h 2011-11-12 02:05:07.000000000 +0100 ++++ gcc-4.7.3/gcc/config/sparc/linux64.h 2013-09-19 11:37:50.000000000 +0200 +@@ -95,6 +95,9 @@ + + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.1" ++ + + #ifdef SPARC_BI_ARCH + +diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/linux.h +--- gcc-4.7.3.orig/gcc/config/sparc/linux.h 2011-11-12 02:05:07.000000000 +0100 ++++ gcc-4.7.3/gcc/config/sparc/linux.h 2013-09-19 11:37:12.000000000 +0200 +@@ -85,6 +85,7 @@ + done. */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.1" + + #undef LINK_SPEC + #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ diff --git a/package/gcc/patches/4.7.3/sdt.patch b/package/gcc/patches/4.7.3/sdt.patch new file mode 100644 index 000000000..7ee2cf1b7 --- /dev/null +++ b/package/gcc/patches/4.7.3/sdt.patch @@ -0,0 +1,14 @@ +diff -Nur gcc-4.7.2.orig/libgcc/unwind-dw2.c gcc-4.7.2/libgcc/unwind-dw2.c +--- gcc-4.7.2.orig/libgcc/unwind-dw2.c 2011-11-02 16:26:35.000000000 +0100 ++++ gcc-4.7.2/libgcc/unwind-dw2.c 2012-09-22 21:56:06.000000000 +0200 +@@ -38,10 +38,6 @@ + #include "gthr.h" + #include "unwind-dw2.h" + +-#ifdef HAVE_SYS_SDT_H +-#include +-#endif +- + #ifndef __USING_SJLJ_EXCEPTIONS__ + + #ifndef STACK_GROWS_DOWNWARD diff --git a/package/gcc/patches/4.8.2/patch-libatomic_Makefile_in b/package/gcc/patches/4.8.2/patch-libatomic_Makefile_in new file mode 100644 index 000000000..e67a62dd3 --- /dev/null +++ b/package/gcc/patches/4.8.2/patch-libatomic_Makefile_in @@ -0,0 +1,12 @@ +--- gcc-4.8.2.orig/libatomic/Makefile.in 2013-10-16 09:27:58.000000000 +0200 ++++ gcc-4.8.2/libatomic/Makefile.in 2014-01-01 11:37:38.000000000 +0100 +@@ -298,7 +298,8 @@ PAT_N = $(word 2,$(PAT_SPLIT)) + PAT_S = $(word 3,$(PAT_SPLIT)) + IFUNC_DEF = -DIFUNC_ALT=$(PAT_S) + IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS)) +-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo ++@AMDEP_FALSE@M_DEPS = + M_SIZE = -DN=$(PAT_N) + M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT)) + M_FILE = $(PAT_BASE)_n.c diff --git a/package/gcc/patches/cflags.patch b/package/gcc/patches/cflags.patch deleted file mode 100644 index 3623d3872..000000000 --- a/package/gcc/patches/cflags.patch +++ /dev/null @@ -1,253 +0,0 @@ - - This patch brings over a few features from MirBSD: - * -fhonour-copts - If this option is not given, it's warned (depending - on environment variables). This is to catch errors - of misbuilt packages which override CFLAGS themselves. - * -Werror-maybe-reset - Has the effect of -Wno-error if GCC_NO_WERROR is - set and not '0', a no-operation otherwise. This is - to be able to use -Werror in "make" but prevent - GNU autoconf generated configure scripts from - freaking out. - * Make -fno-strict-aliasing and -fno-delete-null-pointer-checks - the default for -O2/-Os, because they trigger gcc bugs - and can delete code with security implications. - - This patch was authored by Thorsten Glaser - with copyright assignment to the FSF in effect. - ---- a/gcc/c-family/c-opts.c -+++ b/gcc/c-family/c-opts.c -@@ -103,6 +103,9 @@ static size_t deferred_count; - /* Number of deferred options scanned for -include. */ - static size_t include_cursor; - -+/* Check if a port honours COPTS. */ -+static int honour_copts = 0; -+ - static void handle_OPT_d (const char *); - static void set_std_cxx98 (int); - static void set_std_cxx0x (int); -@@ -441,6 +444,9 @@ c_common_handle_option (size_t scode, co - global_dc->warning_as_error_requested = value; - break; - -+ case OPT_Werror_maybe_reset: -+ break; -+ - case OPT_Wformat: - set_Wformat (value); - break; -@@ -584,6 +590,12 @@ c_common_handle_option (size_t scode, co - flag_no_builtin = !value; - break; - -+ case OPT_fhonour_copts: -+ if (c_language == clk_c) { -+ honour_copts++; -+ } -+ break; -+ - case OPT_fconstant_string_class_: - constant_string_class_name = arg; - break; -@@ -1058,6 +1070,47 @@ c_common_init (void) - return false; - } - -+ if (c_language == clk_c) { -+ char *ev = getenv ("GCC_HONOUR_COPTS"); -+ int evv; -+ if (ev == NULL) -+ evv = -1; -+ else if ((*ev == '0') || (*ev == '\0')) -+ evv = 0; -+ else if (*ev == '1') -+ evv = 1; -+ else if (*ev == '2') -+ evv = 2; -+ else if (*ev == 's') -+ evv = -1; -+ else { -+ warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1"); -+ evv = 1; /* maybe depend this on something like MIRBSD_NATIVE? */ -+ } -+ if (evv == 1) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in lenient mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ warning (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } else if (evv == 2) { -+ if (honour_copts == 0) { -+ error ("someone does not honour COPTS at all in strict mode"); -+ return false; -+ } else if (honour_copts != 1) { -+ error ("someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ return false; -+ } -+ } else if (evv == 0) { -+ if (honour_copts != 1) -+ inform (0, "someone does not honour COPTS correctly, passed %d times", -+ honour_copts); -+ } -+ } -+ - return true; - } - ---- a/gcc/c-family/c.opt -+++ b/gcc/c-family/c.opt -@@ -363,6 +363,10 @@ Werror-implicit-function-declaration - C ObjC RejectNegative Warning Alias(Werror=, implicit-function-declaration) - This switch is deprecated; use -Werror=implicit-function-declaration instead - -+Werror-maybe-reset -+C ObjC C++ ObjC++ -+; Documented in common.opt -+ - Wfloat-equal - C ObjC C++ ObjC++ Var(warn_float_equal) Warning - Warn if testing floating point numbers for equality -@@ -794,6 +798,9 @@ C++ ObjC++ Optimization Alias(fexception - fhonor-std - C++ ObjC++ Ignore Warn(switch %qs is no longer supported) - -+fhonour-copts -+C ObjC C++ ObjC++ RejectNegative -+ - fhosted - C ObjC - Assume normal C execution environment ---- a/gcc/common.opt -+++ b/gcc/common.opt -@@ -520,6 +520,10 @@ Werror= - Common Joined - Treat specified warning as error - -+Werror-maybe-reset -+Common -+If environment variable GCC_NO_WERROR is set, act as -Wno-error -+ - Wextra - Common Var(extra_warnings) Warning - Print extra (possibly unwanted) warnings -@@ -1156,6 +1160,9 @@ fguess-branch-probability - Common Report Var(flag_guess_branch_prob) Optimization - Enable guessing of branch probabilities - -+fhonour-copts -+Common RejectNegative -+ - ; Nonzero means ignore `#ident' directives. 0 means handle them. - ; Generate position-independent code for executables if possible - ; On SVR4 targets, it also controls whether or not to emit a ---- a/gcc/opts.c -+++ b/gcc/opts.c -@@ -477,8 +477,6 @@ static const struct default_options defa - { OPT_LEVELS_2_PLUS, OPT_fschedule_insns2, NULL, 1 }, - #endif - { OPT_LEVELS_2_PLUS, OPT_fregmove, NULL, 1 }, -- { OPT_LEVELS_2_PLUS, OPT_fstrict_aliasing, NULL, 1 }, -- { OPT_LEVELS_2_PLUS, OPT_fstrict_overflow, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_freorder_blocks, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_freorder_functions, NULL, 1 }, - { OPT_LEVELS_2_PLUS, OPT_ftree_vrp, NULL, 1 }, -@@ -494,6 +492,8 @@ static const struct default_options defa - { OPT_LEVELS_2_PLUS, OPT_falign_functions, NULL, 1 }, - - /* -O3 optimizations. */ -+ { OPT_LEVELS_3_PLUS, OPT_fstrict_aliasing, NULL, 1 }, -+ { OPT_LEVELS_3_PLUS, OPT_fstrict_overflow, NULL, 1 }, - { OPT_LEVELS_3_PLUS, OPT_ftree_loop_distribute_patterns, NULL, 1 }, - { OPT_LEVELS_3_PLUS, OPT_fpredictive_commoning, NULL, 1 }, - /* Inlining of functions reducing size is a good idea with -Os -@@ -1399,6 +1399,17 @@ common_handle_option (struct gcc_options - opts, opts_set, loc, dc); - break; - -+ case OPT_Werror_maybe_reset: -+ { -+ char *ev = getenv ("GCC_NO_WERROR"); -+ if ((ev != NULL) && (*ev != '0')) -+ warnings_are_errors = 0; -+ } -+ break; -+ -+ case OPT_fhonour_copts: -+ break; -+ - case OPT_Wlarger_than_: - opts->x_larger_than_size = value; - opts->x_warn_larger_than = value != -1; ---- a/gcc/doc/cppopts.texi -+++ b/gcc/doc/cppopts.texi -@@ -164,6 +164,11 @@ in older programs. This warning is on b - Make all warnings into hard errors. Source code which triggers warnings - will be rejected. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ - @item -Wsystem-headers - @opindex Wsystem-headers - Issue warnings for code in system headers. These are normally unhelpful ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -240,7 +240,7 @@ Objective-C and Objective-C++ Dialects}. - -Wconversion -Wcoverage-mismatch -Wno-cpp -Wno-deprecated @gol - -Wno-deprecated-declarations -Wdisabled-optimization @gol - -Wno-div-by-zero -Wdouble-promotion -Wempty-body -Wenum-compare @gol ---Wno-endif-labels -Werror -Werror=* @gol -+-Wno-endif-labels -Werror -Werror=* -Werror-maybe-reset @gol - -Wfatal-errors -Wfloat-equal -Wformat -Wformat=2 @gol - -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol - -Wformat-security -Wformat-y2k @gol -@@ -4497,6 +4497,22 @@ This option is only supported for C and - @option{-Wall} and by @option{-pedantic}, which can be disabled with - @option{-Wno-pointer-sign}. - -+ at item -Werror-maybe-reset -+ at opindex Werror-maybe-reset -+Act like @samp{-Wno-error} if the @env{GCC_NO_WERROR} environment -+variable is set to anything other than 0 or empty. -+ -+ at item -fhonour-copts -+ at opindex fhonour-copts -+If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not -+given at least once, and warn if it is given more than once. -+If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not -+given exactly once. -+If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option -+is not given exactly once. -+The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}. -+This flag and environment variable only affect the C language. -+ - @item -Wstack-protector - @opindex Wstack-protector - @opindex Wno-stack-protector -@@ -6319,7 +6335,7 @@ so, the first branch is redirected to ei - second branch or a point immediately following it, depending on whether - the condition is known to be true or false. - --Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}. -+Enabled at levels @option{-O3}. - - @item -fsplit-wide-types - @opindex fsplit-wide-types ---- a/gcc/java/jvspec.c -+++ b/gcc/java/jvspec.c -@@ -627,6 +627,7 @@ lang_specific_pre_link (void) - class name. Append dummy `.c' that can be stripped by set_input so %b - is correct. */ - set_input (concat (main_class_name, "main.c", NULL)); -+ putenv ("GCC_HONOUR_COPTS=s"); /* XXX hack! */ - err = do_spec (jvgenmain_spec); - if (err == 0) - { diff --git a/package/gcc/patches/cross-gcc-fix.patch b/package/gcc/patches/cross-gcc-fix.patch deleted file mode 100644 index f39b35fb9..000000000 --- a/package/gcc/patches/cross-gcc-fix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nur gcc-4.4.2.orig/gcc/Makefile.in gcc-4.4.2/gcc/Makefile.in ---- gcc-4.5.2.orig/gcc/Makefile.in 2010-09-02 15:05:30.000000000 +0200 -+++ gcc-4.5.2/gcc/Makefile.in 2011-01-15 14:29:18.000000000 +0100 -@@ -980,7 +980,8 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CXXFLAGS) $ - # Likewise. Put INCLUDES at the beginning: this way, if some autoconf macro - # puts -I options in CPPFLAGS, our include files in the srcdir will always - # win against random include files in /usr/include. --ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) -+#ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS) -+ALL_CPPFLAGS = $(INCLUDES) - - # This is the variable to use when using $(COMPILER). - ifneq ($(ENABLE_BUILD_WITH_CXX),yes) diff --git a/package/gcc/patches/gcc-cppflags.patch b/package/gcc/patches/gcc-cppflags.patch deleted file mode 100644 index 0971bbec9..000000000 --- a/package/gcc/patches/gcc-cppflags.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur gcc-4.4.4.orig/gcc/configure gcc-4.4.4/gcc/configure ---- gcc-4.4.4.orig/gcc/configure 2009-10-19 14:15:27.000000000 +0200 -+++ gcc-4.4.4/gcc/configure 2010-08-02 00:47:36.823620346 +0200 -@@ -13530,7 +13530,7 @@ - esac - saved_CFLAGS="${CFLAGS}" - CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ -- LDFLAGS="${LDFLAGS_FOR_BUILD}" \ -+ LDFLAGS="${LDFLAGS_FOR_BUILD}" CPPFLAGS="${CPPFLAGS_FOR_BUILD}" \ - ${realsrcdir}/configure \ - --enable-languages=${enable_languages-all} \ - --target=$target_alias --host=$build_alias --build=$build_alias diff --git a/package/gcc/patches/ltmain.patch b/package/gcc/patches/ltmain.patch deleted file mode 100644 index 215889b70..000000000 --- a/package/gcc/patches/ltmain.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur gcc-4.5.2.orig/ltmain.sh gcc-4.5.2/ltmain.sh ---- gcc-4.5.2.orig/ltmain.sh 2009-12-05 18:18:53.000000000 +0100 -+++ gcc-4.5.2/ltmain.sh 2011-01-15 14:45:07.000000000 +0100 -@@ -4980,7 +4980,7 @@ - # @file GCC response files - # -tp=* Portland pgcc target processor selection - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|-fstack-protector*|-flto) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/package/gcc/patches/mirbsd-compat.patch b/package/gcc/patches/mirbsd-compat.patch deleted file mode 100644 index 2f3ea0c87..000000000 --- a/package/gcc/patches/mirbsd-compat.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur gcc-4.4.2.orig/gcc/configure gcc-4.4.2/gcc/configure ---- gcc-4.4.2.orig/gcc/configure Tue Mar 24 18:45:39 2009 -+++ gcc-4.4.2/gcc/configure Sat Dec 19 21:07:07 2009 -@@ -19381,7 +19381,7 @@ - dynamic_linker='ldqnx.so' - ;; - --openbsd*) -+mirbsd*|openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no diff --git a/package/gcc/patches/musl-cris.patch b/package/gcc/patches/musl-cris.patch deleted file mode 100644 index 4889263a1..000000000 --- a/package/gcc/patches/musl-cris.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/cris/linux.h gcc-4.7.3/gcc/config/cris/linux.h ---- gcc-4.7.3.orig/gcc/config/cris/linux.h 2011-04-11 20:46:05.000000000 +0200 -+++ gcc-4.7.3/gcc/config/cris/linux.h 2013-10-11 10:01:51.000000000 +0200 -@@ -104,6 +104,7 @@ - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-cris.1" - - #undef CRIS_LINK_SUBTARGET_SPEC - #define CRIS_LINK_SUBTARGET_SPEC \ diff --git a/package/gcc/patches/musl-cross.patch b/package/gcc/patches/musl-cross.patch deleted file mode 100644 index 453ba9aec..000000000 --- a/package/gcc/patches/musl-cross.patch +++ /dev/null @@ -1,825 +0,0 @@ -diff -Nur gcc-4.7.3.orig/config.sub gcc-4.7.3/config.sub ---- gcc-4.7.3.orig/config.sub 2012-08-06 16:34:27.000000000 +0200 -+++ gcc-4.7.3/config.sub 2013-09-16 15:39:42.000000000 +0200 -@@ -4,7 +4,7 @@ - # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - # 2011 Free Software Foundation, Inc. - --timestamp='2011-10-29' -+timestamp='2011-03-23' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -125,6 +125,7 @@ - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -+ linux-musl* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ -@@ -251,17 +252,13 @@ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -- | be32 | be64 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ -- | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ -@@ -295,7 +292,7 @@ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ -- | rl78 | rx \ -+ | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -@@ -304,7 +301,7 @@ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ -- | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ -+ | v850 | v850e \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) -@@ -361,7 +358,6 @@ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ -- | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ -@@ -370,10 +366,8 @@ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ -- | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -@@ -407,7 +401,7 @@ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ -- | rl78-* | romp-* | rs6000-* | rx-* \ -+ | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -@@ -415,11 +409,10 @@ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -- | tile*-* \ -+ | tile-* | tilegx-* \ - | tron-* \ - | ubicom32-* \ -- | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ -- | vax-* \ -+ | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ -@@ -820,10 +813,6 @@ - basic_machine=i370-ibm - os=-mvs - ;; -- nacl) -- basic_machine=le32-unknown -- os=-nacl -- ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 -@@ -1132,8 +1121,13 @@ - basic_machine=t90-cray - os=-unicos - ;; -+ # This must be matched before tile*. -+ tilegx*) -+ basic_machine=tilegx-unknown -+ os=-linux-gnu -+ ;; - tile*) -- basic_machine=$basic_machine-unknown -+ basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) -@@ -1346,6 +1340,7 @@ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ -+ | -linux-musl* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -diff -Nur gcc-4.7.3.orig/fixincludes/mkfixinc.sh gcc-4.7.3/fixincludes/mkfixinc.sh ---- gcc-4.7.3.orig/fixincludes/mkfixinc.sh 2011-09-22 16:00:17.000000000 +0200 -+++ gcc-4.7.3/fixincludes/mkfixinc.sh 2013-09-16 15:39:42.000000000 +0200 -@@ -20,7 +20,8 @@ - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} -diff -Nur gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h gcc-4.7.3/gcc/config/arm/linux-eabi.h ---- gcc-4.7.3.orig/gcc/config/arm/linux-eabi.h 2011-11-02 16:03:19.000000000 +0100 -+++ gcc-4.7.3/gcc/config/arm/linux-eabi.h 2013-09-16 15:39:42.000000000 +0200 -@@ -64,6 +64,23 @@ - #undef GLIBC_DYNAMIC_LINKER - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" - -+/* For ARM musl currently supports two dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI. -+ musl does not support the legacy OABI (i.e. broken) mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, but this can be overridden by changing both -+ MUSL_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-musl-arm.so.1" -+#define MUSL_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-musl-armhf.so.1" -+#define MUSL_DYNAMIC_LINKER_DEFAULT MUSL_DYNAMIC_LINKER_SOFT_FLOAT -+ -+#define MUSL_DYNAMIC_LINKER \ -+ "%{mfloat-abi=hard:" MUSL_DYNAMIC_LINKER_HARD_FLOAT "} \ -+ %{mfloat-abi=soft*:" MUSL_DYNAMIC_LINKER_SOFT_FLOAT "} \ -+ %{!mfloat-abi=*:" MUSL_DYNAMIC_LINKER_DEFAULT "}" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC -diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h ---- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2011-07-07 17:38:34.000000000 +0200 -+++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-09-16 15:39:42.000000000 +0200 -@@ -31,3 +31,7 @@ - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" -diff -Nur gcc-4.7.3.orig/gcc/config/i386/linux.h gcc-4.7.3/gcc/config/i386/linux.h ---- gcc-4.7.3.orig/gcc/config/i386/linux.h 2011-06-03 20:30:39.000000000 +0200 -+++ gcc-4.7.3/gcc/config/i386/linux.h 2013-09-16 15:39:42.000000000 +0200 -@@ -22,3 +22,4 @@ - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" -diff -Nur gcc-4.7.3.orig/gcc/config/linux.h gcc-4.7.3/gcc/config/linux.h ---- gcc-4.7.3.orig/gcc/config/linux.h 2012-08-14 15:59:04.000000000 +0200 -+++ gcc-4.7.3/gcc/config/linux.h 2013-09-16 15:39:42.000000000 +0200 -@@ -33,10 +33,12 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -54,18 +56,21 @@ - uClibc or Bionic is the default C library and whether - -muclibc or -mglibc or -mbionic has been passed to change the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -85,21 +90,21 @@ - - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) - - /* Determine whether the entire c99 runtime - is present in the runtime library. */ - #undef TARGET_C99_FUNCTIONS --#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) -+#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL) - - /* Whether we have sincos that follows the GNU extension. */ - #undef TARGET_HAS_SINCOS -@@ -108,3 +113,74 @@ - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) -+ -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -diff -Nur gcc-4.7.3.orig/gcc/config/linux.opt gcc-4.7.3/gcc/config/linux.opt ---- gcc-4.7.3.orig/gcc/config/linux.opt 2010-09-29 16:51:52.000000000 +0200 -+++ gcc-4.7.3/gcc/config/linux.opt 2013-09-16 15:39:42.000000000 +0200 -@@ -30,3 +30,7 @@ - muclibc - Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) -+Use musl C library -diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux.h gcc-4.7.3/gcc/config/mips/linux.h ---- gcc-4.7.3.orig/gcc/config/mips/linux.h 2011-07-19 20:00:27.000000000 +0200 -+++ gcc-4.7.3/gcc/config/mips/linux.h 2013-09-16 15:39:43.000000000 +0200 -@@ -19,3 +19,5 @@ - . */ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+ -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips.so.1" -diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/linux64.h gcc-4.7.3/gcc/config/rs6000/linux64.h ---- gcc-4.7.3.orig/gcc/config/rs6000/linux64.h 2012-03-12 17:16:51.000000000 +0100 -+++ gcc-4.7.3/gcc/config/rs6000/linux64.h 2013-09-16 15:39:43.000000000 +0200 -@@ -362,17 +362,21 @@ - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - - #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ -diff -Nur gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h gcc-4.7.3/gcc/config/rs6000/sysv4.h ---- gcc-4.7.3.orig/gcc/config/rs6000/sysv4.h 2012-04-30 19:39:01.000000000 +0200 -+++ gcc-4.7.3/gcc/config/rs6000/sysv4.h 2013-09-16 15:39:43.000000000 +0200 -@@ -804,15 +808,18 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -diff -Nur gcc-4.7.3.orig/gcc/config.gcc gcc-4.7.3/gcc/config.gcc ---- gcc-4.7.3.orig/gcc/config.gcc 2013-03-06 23:54:11.000000000 +0100 -+++ gcc-4.7.3/gcc/config.gcc 2013-09-16 15:39:43.000000000 +0200 -@@ -522,7 +522,7 @@ - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # Common parts for widely ported systems. - case ${target} in -@@ -625,6 +625,9 @@ - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; -@@ -2092,6 +2095,10 @@ - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi -diff -Nur gcc-4.7.3.orig/gcc/configure gcc-4.7.3/gcc/configure ---- gcc-4.7.3.orig/gcc/configure 2013-02-06 16:23:55.000000000 +0100 -+++ gcc-4.7.3/gcc/configure 2013-09-16 15:39:43.000000000 +0200 -@@ -26815,7 +26815,8 @@ - gcc_cv_libc_provides_ssp=yes - fi - ;; -- *-*-gnu*) -+ *-*-gnu* | \ -+ *-linux-musl*) - # Avoid complicated tests (see - # ) and for now - # simply assert that glibc does provide this, which is true for all -@@ -26902,6 +26903,9 @@ - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -diff -Nur gcc-4.7.3.orig/gcc/configure.ac gcc-4.7.3/gcc/configure.ac ---- gcc-4.7.3.orig/gcc/configure.ac 2013-02-06 16:23:55.000000000 +0100 -+++ gcc-4.7.3/gcc/configure.ac 2013-09-16 15:39:43.000000000 +0200 -@@ -4692,7 +4692,8 @@ - gcc_cv_libc_provides_ssp=yes - fi] - ;; -- *-*-gnu*) -+ *-*-gnu* | \ -+ *-linux-musl*) - # Avoid complicated tests (see - # ) and for now - # simply assert that glibc does provide this, which is true for all -@@ -4762,6 +4763,9 @@ - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -diff -Nur gcc-4.7.3.orig/gcc/ginclude/stddef.h gcc-4.7.3/gcc/ginclude/stddef.h ---- gcc-4.7.3.orig/gcc/ginclude/stddef.h 2012-02-12 02:06:04.000000000 +0100 -+++ gcc-4.7.3/gcc/ginclude/stddef.h 2013-09-16 15:39:43.000000000 +0200 -@@ -184,6 +184,7 @@ - #ifndef _GCC_SIZE_T - #ifndef _SIZET_ - #ifndef __size_t -+#ifndef __DEFINED_size_t /* musl */ - #define __size_t__ /* BeOS */ - #define __SIZE_T__ /* Cray Unicos/Mk */ - #define _SIZE_T -@@ -200,6 +201,7 @@ - #define ___int_size_t_h - #define _GCC_SIZE_T - #define _SIZET_ -+#define __DEFINED_size_t /* musl */ - #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ - || defined(__FreeBSD_kernel__) - /* __size_t is a typedef on FreeBSD 5, must not trash it. */ -@@ -215,6 +217,7 @@ - typedef long ssize_t; - #endif /* __BEOS__ */ - #endif /* !(defined (__GNUG__) && defined (size_t)) */ -+#endif /* __DEFINED_size_t */ - #endif /* __size_t */ - #endif /* _SIZET_ */ - #endif /* _GCC_SIZE_T */ -diff -Nur gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c ---- gcc-4.7.3.orig/libgcc/unwind-dw2-fde-dip.c 2012-10-06 23:55:06.000000000 +0200 -+++ gcc-4.7.3/libgcc/unwind-dw2-fde-dip.c 2013-09-16 15:39:43.000000000 +0200 -@@ -47,28 +47,13 @@ - #include "unwind-compat.h" - #include "gthr.h" - --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ -- || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__FreeBSD__) && __FreeBSD__ >= 7 --# define ElfW __ElfN --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(__OpenBSD__) --# define ElfW(type) Elf_##type --# define USE_PT_GNU_EH_FRAME --#endif -- --#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -- && defined(TARGET_DL_ITERATE_PHDR) \ -- && defined(__sun__) && defined(__svr4__) -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR) - # define USE_PT_GNU_EH_FRAME -+# ifdef __OpenBSD__ -+# define ElfW(type) Elf_##typ -+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7 -+# define ElfW __ElfN -+# endif - #endif - - #if defined(USE_PT_GNU_EH_FRAME) -diff -Nur gcc-4.7.3.orig/libgomp/config/posix/time.c gcc-4.7.3/libgomp/config/posix/time.c ---- gcc-4.7.3.orig/libgomp/config/posix/time.c 2009-04-09 17:00:19.000000000 +0200 -+++ gcc-4.7.3/libgomp/config/posix/time.c 2013-09-16 15:39:43.000000000 +0200 -@@ -28,6 +28,8 @@ - The following implementation uses the most simple POSIX routines. - If present, POSIX 4 clocks should be used instead. */ - -+#define _POSIX_C_SOURCE 199309L /* for clocks */ -+ - #include "libgomp.h" - #include - #if TIME_WITH_SYS_TIME -diff -Nur gcc-4.7.3.orig/libitm/config/arm/hwcap.cc gcc-4.7.3/libitm/config/arm/hwcap.cc ---- gcc-4.7.3.orig/libitm/config/arm/hwcap.cc 2011-12-15 04:24:05.000000000 +0100 -+++ gcc-4.7.3/libitm/config/arm/hwcap.cc 2013-09-16 15:39:43.000000000 +0200 -@@ -40,7 +40,11 @@ - - #ifdef __linux__ - #include -+#ifdef __GLIBC__ - #include -+#else -+#include -+#endif - #include - - static void __attribute__((constructor)) -diff -Nur gcc-4.7.3.orig/libitm/config/linux/x86/tls.h gcc-4.7.3/libitm/config/linux/x86/tls.h ---- gcc-4.7.3.orig/libitm/config/linux/x86/tls.h 2011-11-08 12:13:41.000000000 +0100 -+++ gcc-4.7.3/libitm/config/linux/x86/tls.h 2013-09-16 15:39:43.000000000 +0200 -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H -diff -Nur gcc-4.7.3.orig/libssp/configure gcc-4.7.3/libssp/configure ---- gcc-4.7.3.orig/libssp/configure 2012-08-06 16:34:27.000000000 +0200 -+++ gcc-4.7.3/libssp/configure 2013-09-16 15:39:43.000000000 +0200 -@@ -626,6 +626,8 @@ - ssp_have_usable_vsnprintf - EGREP - GREP -+LIBSSP_IN_LIBC_FALSE -+LIBSSP_IN_LIBC_TRUE - LIBSSP_USE_SYMVER_SUN_FALSE - LIBSSP_USE_SYMVER_SUN_TRUE - LIBSSP_USE_SYMVER_GNU_FALSE -@@ -735,6 +737,7 @@ - enable_multilib - enable_dependency_tracking - enable_symvers -+enable_ssp_in_libc - enable_shared - enable_static - with_pic -@@ -1374,6 +1377,7 @@ - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --disable-symvers disable symbol versioning for libssp -+ --enable-ssp-in-libc do not build SSP, as it is in libc - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] -@@ -4206,6 +4210,36 @@ - fi - - -+# musl provides libssp in libc -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libssp is provided in libc" >&5 -+$as_echo_n "checking whether libssp is provided in libc... " >&6; } -+# Check whether --enable-ssp_in_libc was given. -+if test "${enable_ssp_in_libc+set}" = set; then : -+ enableval=$enable_ssp_in_libc; ssp_in_libc=$enableval -+else -+ ssp_in_libc=check -+fi -+ -+if test "x$ssp_in_libc" = "xcheck"; then -+ case "$host" in -+ *-musl*) -+ ssp_in_libc=yes -+ ;; -+ -+ *) -+ ssp_in_libc=no -+ ;; -+ esac -+fi -+ if test "x$ssp_in_libc" = xyes; then -+ LIBSSP_IN_LIBC_TRUE= -+ LIBSSP_IN_LIBC_FALSE='#' -+else -+ LIBSSP_IN_LIBC_TRUE='#' -+ LIBSSP_IN_LIBC_FALSE= -+fi -+ -+ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 - $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -@@ -10650,7 +10684,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10653 "configure" -+#line 10687 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -10756,7 +10790,7 @@ - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10759 "configure" -+#line 10793 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11185,6 +11219,10 @@ - as_fn_error "conditional \"LIBSSP_USE_SYMVER_SUN\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi -+if test -z "${LIBSSP_IN_LIBC_TRUE}" && test -z "${LIBSSP_IN_LIBC_FALSE}"; then -+ as_fn_error "conditional \"LIBSSP_IN_LIBC\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - - : ${CONFIG_STATUS=./config.status} - ac_write_fail=0 -diff -Nur gcc-4.7.3.orig/libssp/configure.ac gcc-4.7.3/libssp/configure.ac ---- gcc-4.7.3.orig/libssp/configure.ac 2012-05-31 20:59:34.000000000 +0200 -+++ gcc-4.7.3/libssp/configure.ac 2013-09-16 15:39:43.000000000 +0200 -@@ -114,6 +114,26 @@ - AM_CONDITIONAL(LIBSSP_USE_SYMVER_GNU, [test "x$ssp_use_symver" = xgnu]) - AM_CONDITIONAL(LIBSSP_USE_SYMVER_SUN, [test "x$ssp_use_symver" = xsun]) - -+# musl provides libssp in libc -+AC_MSG_CHECKING([whether libssp is provided in libc]) -+AC_ARG_ENABLE(ssp_in_libc, -+AC_HELP_STRING([--enable-ssp-in-libc], -+ [do not build SSP, as it is in libc]), -+ssp_in_libc=$enableval, -+ssp_in_libc=check) -+if test "x$ssp_in_libc" = "xcheck"; then -+ case "$host" in -+ *-musl*) -+ ssp_in_libc=yes -+ ;; -+ -+ *) -+ ssp_in_libc=no -+ ;; -+ esac -+fi -+AM_CONDITIONAL(LIBSSP_IN_LIBC, [test "x$ssp_in_libc" = xyes]) -+ - AC_CHECK_HEADERS(alloca.h malloc.h paths.h syslog.h string.h unistd.h fcntl.h stdio.h limits.h) - - if test x$gcc_no_link = xyes; then -diff -Nur gcc-4.7.3.orig/libssp/Makefile.am gcc-4.7.3/libssp/Makefile.am ---- gcc-4.7.3.orig/libssp/Makefile.am 2010-12-06 01:50:04.000000000 +0100 -+++ gcc-4.7.3/libssp/Makefile.am 2013-09-16 15:39:43.000000000 +0200 -@@ -36,7 +36,11 @@ - - AM_CFLAGS = -Wall - -+if LIBSSP_IN_LIBC -+toolexeclib_LTLIBRARIES = libssp_nonshared.la -+else - toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la -+endif - - target_noncanonical = @target_noncanonical@ - libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include -diff -Nur gcc-4.7.3.orig/libssp/Makefile.in gcc-4.7.3/libssp/Makefile.in ---- gcc-4.7.3.orig/libssp/Makefile.in 2011-02-13 12:45:53.000000000 +0100 -+++ gcc-4.7.3/libssp/Makefile.in 2013-09-16 15:39:43.000000000 +0200 -@@ -93,12 +93,17 @@ - libssp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libssp_la_LDFLAGS) $(LDFLAGS) -o $@ -+@LIBSSP_IN_LIBC_FALSE@am_libssp_la_rpath = -rpath $(toolexeclibdir) - am_libssp_nonshared_la_OBJECTS = libssp_nonshared_la-ssp-local.lo - libssp_nonshared_la_OBJECTS = $(am_libssp_nonshared_la_OBJECTS) - libssp_nonshared_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) \ - $(libssp_nonshared_la_CFLAGS) $(CFLAGS) \ - $(libssp_nonshared_la_LDFLAGS) $(LDFLAGS) -o $@ -+@LIBSSP_IN_LIBC_FALSE@am_libssp_nonshared_la_rpath = -rpath \ -+@LIBSSP_IN_LIBC_FALSE@ $(toolexeclibdir) -+@LIBSSP_IN_LIBC_TRUE@am_libssp_nonshared_la_rpath = -rpath \ -+@LIBSSP_IN_LIBC_TRUE@ $(toolexeclibdir) - DEFAULT_INCLUDES = -I.@am__isrc@ - depcomp = $(SHELL) $(top_srcdir)/../depcomp - am__depfiles_maybe = depfiles -@@ -258,7 +263,8 @@ - @LIBSSP_USE_SYMVER_GNU_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = $(srcdir)/ssp.map - @LIBSSP_USE_SYMVER_SUN_TRUE@@LIBSSP_USE_SYMVER_TRUE@version_dep = ssp.map-sun - AM_CFLAGS = -Wall --toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la -+@LIBSSP_IN_LIBC_FALSE@toolexeclib_LTLIBRARIES = libssp.la libssp_nonshared.la -+@LIBSSP_IN_LIBC_TRUE@toolexeclib_LTLIBRARIES = libssp_nonshared.la - libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include - nobase_libsubinclude_HEADERS = ssp/ssp.h ssp/string.h ssp/stdio.h ssp/unistd.h - libssp_la_SOURCES = \ -@@ -414,9 +420,9 @@ - rm -f "$${dir}/so_locations"; \ - done - libssp.la: $(libssp_la_OBJECTS) $(libssp_la_DEPENDENCIES) -- $(libssp_la_LINK) -rpath $(toolexeclibdir) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS) -+ $(libssp_la_LINK) $(am_libssp_la_rpath) $(libssp_la_OBJECTS) $(libssp_la_LIBADD) $(LIBS) - libssp_nonshared.la: $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_DEPENDENCIES) -- $(libssp_nonshared_la_LINK) -rpath $(toolexeclibdir) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS) -+ $(libssp_nonshared_la_LINK) $(am_libssp_nonshared_la_rpath) $(libssp_nonshared_la_OBJECTS) $(libssp_nonshared_la_LIBADD) $(LIBS) - - mostlyclean-compile: - -rm -f *.$(OBJEXT) -diff -Nur gcc-4.7.3.orig/libstdc++-v3/configure.host gcc-4.7.3/libstdc++-v3/configure.host ---- gcc-4.7.3.orig/libstdc++-v3/configure.host 2012-12-18 15:27:14.000000000 +0100 -+++ gcc-4.7.3/libstdc++-v3/configure.host 2013-09-16 15:39:43.000000000 +0200 -@@ -243,6 +243,13 @@ - os_include_dir="os/bsd/freebsd" - ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) -+ # check for musl by target -+ case "${host_os}" in -+ *-musl*) -+ os_include_dir="os/generic" -+ ;; -+ *) -+ - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" - elif [ "$bionic" = "yes" ]; then -@@ -251,6 +258,9 @@ - os_include_dir="os/gnu-linux" - fi - ;; -+ -+ esac -+ ;; - hpux*) - os_include_dir="os/hpux" - ;; diff --git a/package/gcc/patches/musl-m68k.patch b/package/gcc/patches/musl-m68k.patch deleted file mode 100644 index 54c7e0eef..000000000 --- a/package/gcc/patches/musl-m68k.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/m68k/linux.h gcc-4.7.3/gcc/config/m68k/linux.h ---- gcc-4.7.3.orig/gcc/config/m68k/linux.h 2011-11-27 00:57:37.000000000 +0100 -+++ gcc-4.7.3/gcc/config/m68k/linux.h 2013-09-28 22:37:22.000000000 +0200 -@@ -73,6 +73,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-m68k.so.1" - - #undef LINK_SPEC - #define LINK_SPEC "-m m68kelf %{shared} \ diff --git a/package/gcc/patches/musl-mips64.patch b/package/gcc/patches/musl-mips64.patch deleted file mode 100644 index 671ba9f28..000000000 --- a/package/gcc/patches/musl-mips64.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/mips/linux64.h gcc-4.7.3/gcc/config/mips/linux64.h ---- gcc-4.7.3.orig/gcc/config/mips/linux64.h 2011-07-19 20:00:27.000000000 +0200 -+++ gcc-4.7.3/gcc/config/mips/linux64.h 2013-09-17 09:24:36.000000000 +0200 -@@ -28,6 +28,9 @@ - #define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" - #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" - #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips.so.1" -+#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mips.so.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips.so.1" - #define GNU_USER_DYNAMIC_LINKERN32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ -- BIONIC_DYNAMIC_LINKERN32) -+ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/package/gcc/patches/musl-ppc.patch b/package/gcc/patches/musl-ppc.patch deleted file mode 100644 index f4211ee73..000000000 --- a/package/gcc/patches/musl-ppc.patch +++ /dev/null @@ -1,155 +0,0 @@ -diff -Nur gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h ---- gcc-4.7.3.orig/libgcc/config/rs6000/linux-unwind.h 2011-11-12 18:20:58.000000000 +0100 -+++ gcc-4.7.3/libgcc/config/rs6000/linux-unwind.h 2013-09-15 18:29:20.000000000 +0200 -@@ -27,7 +27,6 @@ - #define R_CR2 70 - #define R_VR0 77 - #define R_VRSAVE 109 --#define R_VSCR 110 - - struct gcc_vregs - { -@@ -176,38 +175,6 @@ - } - #endif - --/* Find an entry in the process auxiliary vector. The canonical way to -- test for VMX is to look at AT_HWCAP. */ -- --static long --ppc_linux_aux_vector (long which) --{ -- /* __libc_stack_end holds the original stack passed to a process. */ -- extern long *__libc_stack_end; -- long argc; -- char **argv; -- char **envp; -- struct auxv -- { -- long a_type; -- long a_val; -- } *auxp; -- -- /* The Linux kernel puts argc first on the stack. */ -- argc = __libc_stack_end[0]; -- /* Followed by argv, NULL terminated. */ -- argv = (char **) __libc_stack_end + 1; -- /* Followed by environment string pointers, NULL terminated. */ -- envp = argv + argc + 1; -- while (*envp++) -- continue; -- /* Followed by the aux vector, zero terminated. */ -- for (auxp = (struct auxv *) envp; auxp->a_type != 0; ++auxp) -- if (auxp->a_type == which) -- return auxp->a_val; -- return 0; --} -- - /* Do code reading to identify a signal frame, and set the frame - state data appropriately. See unwind-dw2.c for the structs. */ - -@@ -217,8 +184,8 @@ - ppc_fallback_frame_state (struct _Unwind_Context *context, - _Unwind_FrameState *fs) - { -- static long hwcap = 0; - struct gcc_regs *regs = get_regs (context); -+ struct gcc_vregs *vregs; - long new_cfa; - int i; - -@@ -230,12 +197,15 @@ - fs->regs.cfa_reg = STACK_POINTER_REGNUM; - fs->regs.cfa_offset = new_cfa - (long) context->cfa; - -- for (i = 0; i < 32; i++) -- if (i != STACK_POINTER_REGNUM) -- { -- fs->regs.reg[i].how = REG_SAVED_OFFSET; -- fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; -- } -+#ifdef __powerpc64__ -+ fs->regs.reg[2].how = REG_SAVED_OFFSET; -+ fs->regs.reg[2].loc.offset = (long) ®s->gpr[2] - new_cfa; -+#endif -+ for (i = 14; i < 32; i++) -+ { -+ fs->regs.reg[i].how = REG_SAVED_OFFSET; -+ fs->regs.reg[i].loc.offset = (long) ®s->gpr[i] - new_cfa; -+ } - - fs->regs.reg[R_CR2].how = REG_SAVED_OFFSET; - /* CR? regs are always 32-bit and PPC is big-endian, so in 64-bit -@@ -251,57 +221,35 @@ - fs->retaddr_column = ARG_POINTER_REGNUM; - fs->signal_frame = 1; - -- if (hwcap == 0) -+ /* If we have a FPU... */ -+ for (i = 14; i < 32; i++) - { -- hwcap = ppc_linux_aux_vector (16); -- /* These will already be set if we found AT_HWCAP. A nonzero -- value stops us looking again if for some reason we couldn't -- find AT_HWCAP. */ --#ifdef __powerpc64__ -- hwcap |= 0xc0000000; --#else -- hwcap |= 0x80000000; --#endif -+ fs->regs.reg[i + 32].how = REG_SAVED_OFFSET; -+ fs->regs.reg[i + 32].loc.offset = (long) ®s->fpr[i] - new_cfa; - } - -- /* If we have a FPU... */ -- if (hwcap & 0x08000000) -- for (i = 0; i < 32; i++) -- { -- fs->regs.reg[i + 32].how = REG_SAVED_OFFSET; -- fs->regs.reg[i + 32].loc.offset = (long) ®s->fpr[i] - new_cfa; -- } -- - /* If we have a VMX unit... */ -- if (hwcap & 0x10000000) -- { -- struct gcc_vregs *vregs; - #ifdef __powerpc64__ -- vregs = regs->vp; -+ vregs = regs->vp; - #else -- vregs = ®s->vregs; -+ vregs = ®s->vregs; - #endif -- if (regs->msr & (1 << 25)) -+ if (regs->msr & (1 << 25)) -+ { -+ for (i = 20; i < 32; i++) - { -- for (i = 0; i < 32; i++) -- { -- fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET; -- fs->regs.reg[i + R_VR0].loc.offset -- = (long) &vregs->vr[i] - new_cfa; -- } -- -- fs->regs.reg[R_VSCR].how = REG_SAVED_OFFSET; -- fs->regs.reg[R_VSCR].loc.offset = (long) &vregs->vscr - new_cfa; -+ fs->regs.reg[i + R_VR0].how = REG_SAVED_OFFSET; -+ fs->regs.reg[i + R_VR0].loc.offset = (long) &vregs->vr[i] - new_cfa; - } -- -- fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET; -- fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa; - } - -+ fs->regs.reg[R_VRSAVE].how = REG_SAVED_OFFSET; -+ fs->regs.reg[R_VRSAVE].loc.offset = (long) &vregs->vsave - new_cfa; -+ - /* If we have SPE register high-parts... we check at compile-time to - avoid expanding the code for all other PowerPC. */ - #ifdef __SPE__ -- for (i = 0; i < 32; i++) -+ for (i = 14; i < 32; i++) - { - fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].how = REG_SAVED_OFFSET; - fs->regs.reg[i + FIRST_PSEUDO_REGISTER - 1].loc.offset diff --git a/package/gcc/patches/musl-sh.patch b/package/gcc/patches/musl-sh.patch deleted file mode 100644 index 7738f266e..000000000 --- a/package/gcc/patches/musl-sh.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/sh/linux.h gcc-4.7.3/gcc/config/sh/linux.h ---- gcc-4.7.3.orig/gcc/config/sh/linux.h 2013-03-25 23:55:56.000000000 +0100 -+++ gcc-4.7.3/gcc/config/sh/linux.h 2013-09-26 21:16:39.000000000 +0200 -@@ -46,6 +46,7 @@ - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh.1" - - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" diff --git a/package/gcc/patches/musl-sparc.patch b/package/gcc/patches/musl-sparc.patch deleted file mode 100644 index 228b8522d..000000000 --- a/package/gcc/patches/musl-sparc.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux64.h gcc-4.7.3/gcc/config/sparc/linux64.h ---- gcc-4.7.3.orig/gcc/config/sparc/linux64.h 2011-11-12 02:05:07.000000000 +0100 -+++ gcc-4.7.3/gcc/config/sparc/linux64.h 2013-09-19 11:37:50.000000000 +0200 -@@ -95,6 +95,9 @@ - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-sparc.1" -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-sparc.1" -+ - - #ifdef SPARC_BI_ARCH - -diff -Nur gcc-4.7.3.orig/gcc/config/sparc/linux.h gcc-4.7.3/gcc/config/sparc/linux.h ---- gcc-4.7.3.orig/gcc/config/sparc/linux.h 2011-11-12 02:05:07.000000000 +0100 -+++ gcc-4.7.3/gcc/config/sparc/linux.h 2013-09-19 11:37:12.000000000 +0200 -@@ -85,6 +85,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sparc.1" - - #undef LINK_SPEC - #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ diff --git a/package/gcc/patches/sdt.patch b/package/gcc/patches/sdt.patch deleted file mode 100644 index 7ee2cf1b7..000000000 --- a/package/gcc/patches/sdt.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nur gcc-4.7.2.orig/libgcc/unwind-dw2.c gcc-4.7.2/libgcc/unwind-dw2.c ---- gcc-4.7.2.orig/libgcc/unwind-dw2.c 2011-11-02 16:26:35.000000000 +0100 -+++ gcc-4.7.2/libgcc/unwind-dw2.c 2012-09-22 21:56:06.000000000 +0200 -@@ -38,10 +38,6 @@ - #include "gthr.h" - #include "unwind-dw2.h" - --#ifdef HAVE_SYS_SDT_H --#include --#endif -- - #ifndef __USING_SJLJ_EXCEPTIONS__ - - #ifndef STACK_GROWS_DOWNWARD diff --git a/package/glibc/files/libc.so.microblaze b/package/glibc/files/libc.so.microblaze new file mode 100644 index 000000000..4642dcbd5 --- /dev/null +++ b/package/glibc/files/libc.so.microblaze @@ -0,0 +1,5 @@ +/* GNU ld script + Use the shared library, but some functions are only in + the static library, so try that secondarily. */ +OUTPUT_FORMAT(elf32-microblaze) +GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld.so.1 ) ) -- cgit v1.2.3 From 8207b8d44693503e1c086aea0fc30c592a59b15d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 1 Jan 2014 20:19:13 +0100 Subject: another round of updates and musl fixes --- package/binutils/Makefile | 4 +- package/davfs2/Makefile | 10 +++-- package/davfs2/patches/patch-src_cache_c | 14 ++++-- package/davfs2/patches/patch-src_coda_h | 15 +++++++ package/davfs2/patches/patch-src_dav_fuse_c | 19 ++++---- .../davfs2/patches/patch-src_kernel_interface_c | 10 +++++ package/davfs2/patches/patch-src_mount_davfs_c | 30 ++++++++----- package/davfs2/patches/patch-src_webdav_c | 18 +++++--- package/dhcp-forwarder/Makefile | 4 +- package/dhcp-forwarder/patches/patch-src_parser_c | 10 +++++ package/digitemp/Makefile | 1 + package/fuse/Makefile | 2 +- package/fuse/patches/patch-lib_fuse_c | 10 +++++ package/fuse/patches/patch-lib_fuse_lowlevel_c | 10 +++++ package/fuse/patches/patch-lib_mount_util_c | 10 +++++ package/fuse/patches/patch-util_mount_util_c | 10 +++++ package/hostapd/Makefile | 4 +- package/iptraf/Makefile | 2 + package/kismet/Makefile | 11 +++-- package/kismet/patches/patch-configure_in | 12 ++++++ package/libunistring/Makefile | 2 + package/m4/Makefile | 2 +- package/mdadm/Makefile | 4 +- package/mdadm/patches/patch-Makefile | 22 +++------- package/ncurses/Makefile | 5 ++- package/net-snmp/Makefile | 2 +- .../patches/patch-agent_mibgroup_mibII_tcpTable_c | 12 +++--- ...-agent_mibgroup_util_funcs_get_pid_from_inode_c | 10 +++++ package/net-snmp/patches/patch-net-snmp-config_in | 6 +-- package/oprofile/Makefile | 2 +- package/orbit2/Makefile | 9 ++-- .../patches/patch-src_idl-compiler_Makefile_in | 9 ---- package/portsentry/Makefile | 2 + package/quagga/Makefile | 4 +- package/quagga/patches/patch-configure | 20 --------- package/quagga/patches/patch-lib_queue_h | 11 +++++ package/quagga/patches/patch-lib_sockopt_c | 23 ++++++++++ package/quagga/patches/patch-lib_zebra_h | 10 +++++ package/quagga/patches/patch-ltmain_sh | 11 ----- package/quagga/patches/patch-redhat_quagga_spec | 11 ----- package/quagga/patches/patch-vtysh_extract_pl | 8 ---- package/rdate/Makefile | 1 + package/rdate/patches/patch-ntp_c | 50 ++++++++++++++++++++++ package/rdate/patches/patch-rdate_h | 11 +++++ package/rdate/patches/patch-rfc868time_c | 11 +++++ package/rtmpdump/patches/patch-Makefile.orig | 28 ------------ package/scsi-spin/src/scsi-spin.c | 5 ++- package/tinc/Makefile | 7 ++- package/tinc/patches/patch-src_Makefile_in | 11 ----- package/tinc/patches/patch-src_have_h | 25 +++++++++++ package/tinc/patches/patch-src_linux_device_c | 20 --------- package/vnc-reflector/Makefile | 2 +- package/vnc-reflector/patches/patch-actions_c | 10 +++++ package/vnc-reflector/patches/patch-active_c | 10 +++++ package/vnc-reflector/patches/patch-region_c | 10 +++++ package/wifidog/Makefile | 2 +- package/wifidog/patches/patch-libhttpd_api_c | 6 +-- package/wifidog/patches/patch-libhttpd_ip_acl_c | 14 +++++- package/wifidog/patches/patch-libhttpd_protocol_c | 20 ++++++--- package/wifidog/patches/patch-src_client_list_c | 11 +++++ package/wifidog/patches/patch-src_firewall_c | 11 +++++ package/wifidog/patches/patch-src_util_c | 11 +++++ package/xfsprogs/Makefile | 2 +- 63 files changed, 449 insertions(+), 220 deletions(-) create mode 100644 package/davfs2/patches/patch-src_coda_h create mode 100644 package/davfs2/patches/patch-src_kernel_interface_c create mode 100644 package/dhcp-forwarder/patches/patch-src_parser_c create mode 100644 package/fuse/patches/patch-lib_fuse_c create mode 100644 package/fuse/patches/patch-lib_fuse_lowlevel_c create mode 100644 package/fuse/patches/patch-lib_mount_util_c create mode 100644 package/fuse/patches/patch-util_mount_util_c create mode 100644 package/kismet/patches/patch-configure_in create mode 100644 package/net-snmp/patches/patch-agent_mibgroup_util_funcs_get_pid_from_inode_c delete mode 100644 package/quagga/patches/patch-configure create mode 100644 package/quagga/patches/patch-lib_queue_h create mode 100644 package/quagga/patches/patch-lib_sockopt_c create mode 100644 package/quagga/patches/patch-lib_zebra_h delete mode 100644 package/quagga/patches/patch-ltmain_sh delete mode 100644 package/quagga/patches/patch-redhat_quagga_spec delete mode 100644 package/quagga/patches/patch-vtysh_extract_pl create mode 100644 package/rdate/patches/patch-ntp_c create mode 100644 package/rdate/patches/patch-rdate_h create mode 100644 package/rdate/patches/patch-rfc868time_c delete mode 100644 package/rtmpdump/patches/patch-Makefile.orig delete mode 100644 package/tinc/patches/patch-src_Makefile_in create mode 100644 package/tinc/patches/patch-src_have_h delete mode 100644 package/tinc/patches/patch-src_linux_device_c create mode 100644 package/vnc-reflector/patches/patch-actions_c create mode 100644 package/vnc-reflector/patches/patch-active_c create mode 100644 package/vnc-reflector/patches/patch-region_c create mode 100644 package/wifidog/patches/patch-src_client_list_c create mode 100644 package/wifidog/patches/patch-src_firewall_c create mode 100644 package/wifidog/patches/patch-src_util_c (limited to 'package') diff --git a/package/binutils/Makefile b/package/binutils/Makefile index e429001bf..c66ab6d2d 100644 --- a/package/binutils/Makefile +++ b/package/binutils/Makefile @@ -42,8 +42,8 @@ else CONFIGURE_ARGS+= --disable-werror endif -pre-build: - @-rm $(STAGING_TARGET_DIR)/lib/libiberty.a $(STAGING_TARGET_DIR)/usr/lib/libiberty.a +post-build: + $(CP) ${WRKBUILD}/libiberty/libiberty.a $(STAGING_TARGET_DIR)/usr/lib libbfd-install: ${INSTALL_DIR} ${IDIR_LIBBFD}/usr/lib diff --git a/package/davfs2/Makefile b/package/davfs2/Makefile index 1b4c0a3ff..cde8727d3 100644 --- a/package/davfs2/Makefile +++ b/package/davfs2/Makefile @@ -4,15 +4,17 @@ include ${TOPDIR}/rules.mk PKG_NAME:= davfs2 -PKG_VERSION:= 1.4.6 -PKG_RELEASE:= 2 -PKG_MD5SUM:= c9e8aeb15daeba4b6283b40bb640e908 +PKG_VERSION:= 1.4.7 +PKG_RELEASE:= 1 +PKG_MD5SUM:= c75f9d7d260e7364362b89beba2b3186 PKG_DESCR:= WebDAV filesystem PKG_SECTION:= net/fs PKG_DEPENDS:= fuse-utils kmod-fuse-fs neon PKG_BUILDDEP:= libiconv-tiny neon fuse PKG_URL:= http://savannah.nongnu.org/projects/davfs2/ -PKG_SITES:= http://www.very-clever.com/download/nongnu/davfs2/ +PKG_SITES:= http://download.savannah.gnu.org/releases/davfs2/ + +PKG_LIBC_DEPENDS:= uclibc eglibc glibc include ${TOPDIR}/mk/package.mk diff --git a/package/davfs2/patches/patch-src_cache_c b/package/davfs2/patches/patch-src_cache_c index dd03ed67c..f6e5cdce5 100644 --- a/package/davfs2/patches/patch-src_cache_c +++ b/package/davfs2/patches/patch-src_cache_c @@ -1,6 +1,14 @@ ---- davfs2-1.4.6.orig/src/cache.c 2009-11-15 11:15:17.000000000 +0100 -+++ davfs2-1.4.6/src/cache.c 2010-12-27 22:02:47.000000000 +0100 -@@ -55,7 +55,6 @@ +--- davfs2-1.4.7.orig/src/cache.c 2012-07-19 13:26:00.000000000 +0200 ++++ davfs2-1.4.7/src/cache.c 2014-01-01 20:01:21.000000000 +0100 +@@ -24,7 +24,6 @@ + #include + #endif + #include +-#include + #ifdef HAVE_FCNTL_H + #include + #endif +@@ -55,7 +54,6 @@ #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/package/davfs2/patches/patch-src_coda_h b/package/davfs2/patches/patch-src_coda_h new file mode 100644 index 000000000..9960514d9 --- /dev/null +++ b/package/davfs2/patches/patch-src_coda_h @@ -0,0 +1,15 @@ +--- davfs2-1.4.7.orig/src/coda.h 2009-04-14 21:54:57.000000000 +0200 ++++ davfs2-1.4.7/src/coda.h 2014-01-01 20:12:52.000000000 +0100 +@@ -57,6 +57,12 @@ typedef int int32_t; + typedef unsigned int u_int32_t; + #endif + ++typedef unsigned long u_long; ++typedef unsigned int u_int; ++typedef unsigned short u_short; ++typedef unsigned long long u_quad_t; ++#include ++ + + /* + * Cfs constants diff --git a/package/davfs2/patches/patch-src_dav_fuse_c b/package/davfs2/patches/patch-src_dav_fuse_c index fca0e83f2..1a67e1563 100644 --- a/package/davfs2/patches/patch-src_dav_fuse_c +++ b/package/davfs2/patches/patch-src_dav_fuse_c @@ -1,10 +1,11 @@ ---- davfs2-1.4.6.orig/src/dav_fuse.c 2010-02-16 20:29:49.000000000 +0100 -+++ davfs2-1.4.6/src/dav_fuse.c 2010-12-27 22:02:24.000000000 +0100 -@@ -33,6 +33,7 @@ - #ifdef HAVE_STDINT_H - #include +--- davfs2-1.4.7.orig/src/dav_fuse.c 2012-07-19 13:18:51.000000000 +0200 ++++ davfs2-1.4.7/src/dav_fuse.c 2014-01-01 20:02:55.000000000 +0100 +@@ -48,6 +48,8 @@ + #include #endif -+#include - #include - #ifdef HAVE_SYSLOG_H - #include + ++#include ++ + #include "defaults.h" + #include "mount_davfs.h" + #include "cache.h" diff --git a/package/davfs2/patches/patch-src_kernel_interface_c b/package/davfs2/patches/patch-src_kernel_interface_c new file mode 100644 index 000000000..5a884cfa3 --- /dev/null +++ b/package/davfs2/patches/patch-src_kernel_interface_c @@ -0,0 +1,10 @@ +--- davfs2-1.4.7.orig/src/kernel_interface.c 2012-07-19 12:58:48.000000000 +0200 ++++ davfs2-1.4.7/src/kernel_interface.c 2014-01-01 20:01:11.000000000 +0100 +@@ -20,7 +20,6 @@ + + #include "config.h" + +-#include + #ifdef HAVE_FCNTL_H + #include + #endif diff --git a/package/davfs2/patches/patch-src_mount_davfs_c b/package/davfs2/patches/patch-src_mount_davfs_c index 516604ffc..a86657673 100644 --- a/package/davfs2/patches/patch-src_mount_davfs_c +++ b/package/davfs2/patches/patch-src_mount_davfs_c @@ -1,6 +1,16 @@ ---- davfs2-1.4.6.orig/src/mount_davfs.c 2010-01-21 19:50:15.000000000 +0100 -+++ davfs2-1.4.6/src/mount_davfs.c 2010-05-29 21:10:23.041613426 +0200 -@@ -29,7 +29,6 @@ +--- davfs2-1.4.7.orig/src/mount_davfs.c 2012-07-19 13:35:11.000000000 +0200 ++++ davfs2-1.4.7/src/mount_davfs.c 2014-01-01 20:14:21.000000000 +0100 +@@ -20,16 +20,15 @@ + + #include "config.h" + ++#include + #ifdef HAVE_ARGZ_H + #include + #endif + #include + #include +-#include #ifdef HAVE_FCNTL_H #include #endif @@ -8,15 +18,15 @@ #include #include #ifdef HAVE_LIBINTL_H -@@ -677,6 +676,7 @@ check_double_mounts(dav_args *args) +@@ -674,6 +673,7 @@ check_double_mounts(dav_args *args) static void check_fstab(const dav_args *args) { +#if 0 dav_args *n_args = new_args(); n_args->mopts = DAV_USER_MOPTS; - -@@ -733,6 +733,7 @@ check_fstab(const dav_args *args) + setfsent(); +@@ -737,6 +737,7 @@ check_fstab(const dav_args *args) endfsent(); delete_args(n_args); @@ -24,7 +34,7 @@ } -@@ -754,7 +755,7 @@ check_mountpoint(dav_args *args) +@@ -758,7 +759,7 @@ check_mountpoint(dav_args *args) struct passwd *pw; if (*mpoint != '/') { @@ -33,7 +43,7 @@ if (!mp) error(EXIT_FAILURE, 0, _("can't evaluate path of mount point %s"), mpoint); -@@ -1824,6 +1825,7 @@ new_args(void) +@@ -1793,6 +1794,7 @@ new_args(void) static void log_dbg_cmdline(char *argv[]) { @@ -41,8 +51,8 @@ size_t len; char *cmdline; if (argz_create(argv, &cmdline, &len) == 0) { -@@ -1831,6 +1833,7 @@ log_dbg_cmdline(char *argv[]) - syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), cmdline); +@@ -1800,6 +1802,7 @@ log_dbg_cmdline(char *argv[]) + syslog(LOG_MAKEPRI(LOG_DAEMON, LOG_DEBUG), "%s", cmdline); free(cmdline); } + */ diff --git a/package/davfs2/patches/patch-src_webdav_c b/package/davfs2/patches/patch-src_webdav_c index 20b125f1a..a2a71fe05 100644 --- a/package/davfs2/patches/patch-src_webdav_c +++ b/package/davfs2/patches/patch-src_webdav_c @@ -1,6 +1,14 @@ ---- davfs2-1.4.6.orig/src/webdav.c 2010-02-16 20:29:59.000000000 +0100 -+++ davfs2-1.4.6/src/webdav.c 2010-05-30 09:52:01.161613627 +0200 -@@ -52,6 +52,8 @@ +--- davfs2-1.4.7.orig/src/webdav.c 2012-07-19 13:27:51.000000000 +0200 ++++ davfs2-1.4.7/src/webdav.c 2014-01-01 20:14:54.000000000 +0100 +@@ -21,7 +21,6 @@ + #include "config.h" + + #include +-#include + #ifdef HAVE_FCNTL_H + #include + #endif +@@ -52,6 +51,8 @@ #include #endif @@ -9,7 +17,7 @@ #include #include #include -@@ -1918,6 +1920,7 @@ quota_result(void *userdata, const ne_ur +@@ -1921,6 +1922,7 @@ quota_result(void *userdata, const ne_ur static int ssl_verify(void *userdata, int failures, const ne_ssl_certificate *cert) { @@ -17,7 +25,7 @@ char *issuer = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); char *subject = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); char *digest = ne_calloc(NE_SSL_DIGESTLEN); -@@ -1964,8 +1967,13 @@ ssl_verify(void *userdata, int failures, +@@ -1967,8 +1969,13 @@ ssl_verify(void *userdata, int failures, len = getline(&s, &n, stdin); if (len < 0) abort(); diff --git a/package/dhcp-forwarder/Makefile b/package/dhcp-forwarder/Makefile index a681a07a7..a72937e15 100644 --- a/package/dhcp-forwarder/Makefile +++ b/package/dhcp-forwarder/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= dhcp-forwarder -PKG_VERSION:= 0.9 +PKG_VERSION:= 0.10 PKG_RELEASE:= 1 -PKG_MD5SUM:= 63630db269ac17523ad085b67277b1c3 +PKG_MD5SUM:= 97b5f3ddbdee5c1f6756321c15907138 PKG_DESCR:= DHCP relay agent PKG_SECTION:= dhcp PKG_URL:= http://www.nongnu.org/dhcp-fwd/ diff --git a/package/dhcp-forwarder/patches/patch-src_parser_c b/package/dhcp-forwarder/patches/patch-src_parser_c new file mode 100644 index 000000000..b05ef56a0 --- /dev/null +++ b/package/dhcp-forwarder/patches/patch-src_parser_c @@ -0,0 +1,10 @@ +--- dhcp-forwarder-0.10.orig/src/parser.c 2012-04-30 12:57:35.000000000 +0200 ++++ dhcp-forwarder-0.10/src/parser.c 2013-12-30 19:16:07.000000000 +0100 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + + #include "parser.h" + #include "cfg.h" diff --git a/package/digitemp/Makefile b/package/digitemp/Makefile index 8a7b04b55..a7309e882 100644 --- a/package/digitemp/Makefile +++ b/package/digitemp/Makefile @@ -14,6 +14,7 @@ PKG_BUILDDEP:= libusb libusb-compat PKG_URL:= http://www.digitemp.com/software/linux/ PKG_SITES:= http://www.digitemp.com/software/linux/ +PKG_LIBC_DEPENDS:= uclibc eglibc glibc PKG_ARCH_DEPENDS:= !avr32 include ${TOPDIR}/mk/package.mk diff --git a/package/fuse/Makefile b/package/fuse/Makefile index 5515ae209..6cfef381f 100644 --- a/package/fuse/Makefile +++ b/package/fuse/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= fuse PKG_VERSION:= 2.9.3 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 33cae22ca50311446400daf8a6255c6a PKG_DESCR:= Filesystem in Userspace (utilities) PKG_SECTION:= fs diff --git a/package/fuse/patches/patch-lib_fuse_c b/package/fuse/patches/patch-lib_fuse_c new file mode 100644 index 000000000..9b3c74e39 --- /dev/null +++ b/package/fuse/patches/patch-lib_fuse_c @@ -0,0 +1,10 @@ +--- fuse-2.9.3.orig/lib/fuse.c 2013-07-01 09:40:39.000000000 +0200 ++++ fuse-2.9.3/lib/fuse.c 2014-01-01 11:45:54.000000000 +0100 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/package/fuse/patches/patch-lib_fuse_lowlevel_c b/package/fuse/patches/patch-lib_fuse_lowlevel_c new file mode 100644 index 000000000..253b89d27 --- /dev/null +++ b/package/fuse/patches/patch-lib_fuse_lowlevel_c @@ -0,0 +1,10 @@ +--- fuse-2.9.3.orig/lib/fuse_lowlevel.c 2013-07-01 09:40:39.000000000 +0200 ++++ fuse-2.9.3/lib/fuse_lowlevel.c 2014-01-01 11:50:38.000000000 +0100 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #ifndef F_LINUX_SPECIFIC_BASE + #define F_LINUX_SPECIFIC_BASE 1024 diff --git a/package/fuse/patches/patch-lib_mount_util_c b/package/fuse/patches/patch-lib_mount_util_c new file mode 100644 index 000000000..5c8639b43 --- /dev/null +++ b/package/fuse/patches/patch-lib_mount_util_c @@ -0,0 +1,10 @@ +--- fuse-2.9.3.orig/lib/mount_util.c 2013-07-01 09:25:36.000000000 +0200 ++++ fuse-2.9.3/lib/mount_util.c 2014-01-01 11:52:48.000000000 +0100 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #ifndef __NetBSD__ + #include + #endif diff --git a/package/fuse/patches/patch-util_mount_util_c b/package/fuse/patches/patch-util_mount_util_c new file mode 100644 index 000000000..d38196ed0 --- /dev/null +++ b/package/fuse/patches/patch-util_mount_util_c @@ -0,0 +1,10 @@ +--- fuse-2.9.3.orig/util/mount_util.c 2013-07-01 10:02:18.000000000 +0200 ++++ fuse-2.9.3/util/mount_util.c 2014-01-01 11:54:07.000000000 +0100 +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #ifndef __NetBSD__ + #include + #endif diff --git a/package/hostapd/Makefile b/package/hostapd/Makefile index 51f638578..d6373de34 100644 --- a/package/hostapd/Makefile +++ b/package/hostapd/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= hostapd -PKG_VERSION:= 1.0 +PKG_VERSION:= 2.0 PKG_RELEASE:= 1 -PKG_MD5SUM:= 236247a7bbd4f60d5fa3e99849d1ffc9 +PKG_MD5SUM:= ba22e639bc57aa4035d2ea8ffa9bbbee PKG_DESCR:= an IEEE 802.11 AP, IEEE 802.1x/WPA/WPA2/EAP/RADIUS Authenticator PKG_SECTION:= wifi PKG_DEPENDS:= libnl diff --git a/package/iptraf/Makefile b/package/iptraf/Makefile index 2bcffc733..7ae627284 100644 --- a/package/iptraf/Makefile +++ b/package/iptraf/Makefile @@ -22,7 +22,9 @@ CONFIG_STYLE:= manual BUILD_STYLE:= manual INSTALL_STYLE:= manual +TARGET_CPPFLAGS+= -D_GNU_SOURCE TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) +TARGET_LDFLAGS+= -ltinfo do-build: ${MAKE} -C ${WRKBUILD}/src \ diff --git a/package/kismet/Makefile b/package/kismet/Makefile index b5aa3de05..df52c74b8 100644 --- a/package/kismet/Makefile +++ b/package/kismet/Makefile @@ -4,16 +4,18 @@ include ${TOPDIR}/rules.mk PKG_NAME:= kismet -PKG_VERSION:= 2011-01-R1 -PKG_RELEASE:= 3 -PKG_MD5SUM:= 1fb1f024a7ca52814b255e2f2faccf3b +PKG_VERSION:= 2013-03-R1b +PKG_RELEASE:= 1 +PKG_MD5SUM:= 596acdd2940887dd05a498ea27475eea PKG_DESCR:= Kismet PKG_SECTION:= wifi PKG_DEPENDS:= libpcap libncurses libpthread -PKG_BUILDDEP:= libpcap ncurses +PKG_BUILDDEP:= autotool libpcap ncurses PKG_URL:= http://www.kismetwireless.net/ PKG_SITES:= http://www.kismetwireless.net/code/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.xz + PKG_SUBPKGS:= KISMET KISMET_CLIENT KISMET_DRONE KISMET_SERVER PKGSD_KISMET_CLIENT:= Kismet client PKGSD_KISMET_SERVER:= Kismet server @@ -26,6 +28,7 @@ $(eval $(call PKG_template,KISMET_CLIENT,kismet-client,${PKG_VERSION}-${PKG_RELE $(eval $(call PKG_template,KISMET_DRONE,kismet-drone,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_KISMET_DRONE},${PKG_SECTION})) $(eval $(call PKG_template,KISMET_SERVER,kismet-server,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_KISMET_SERVER},${PKG_SECTION})) +AUTOTOOL_STYLE:= autoreconf TARGET_LDFLAGS+= -lpthread CONFIGURE_ARGS+= --sysconfdir=/etc/kismet diff --git a/package/kismet/patches/patch-configure_in b/package/kismet/patches/patch-configure_in new file mode 100644 index 000000000..cb7d45cbd --- /dev/null +++ b/package/kismet/patches/patch-configure_in @@ -0,0 +1,12 @@ +--- kismet-2013-03-R1b.orig/configure.in 2013-03-27 15:41:48.000000000 +0100 ++++ kismet-2013-03-R1b/configure.in 2013-12-31 23:14:38.000000000 +0100 +@@ -406,9 +406,6 @@ AC_ARG_ENABLE(client, + ) + AC_SUBST(wantclient) + +-# Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" +- + termcontrol="none"; + + if test "$wantclient" = "yes"; then diff --git a/package/libunistring/Makefile b/package/libunistring/Makefile index b1e131160..3831e0638 100755 --- a/package/libunistring/Makefile +++ b/package/libunistring/Makefile @@ -13,6 +13,8 @@ PKG_URL:= http://www.gnu.org/software/libunistring/ PKG_SITES:= ${MASTER_SITE_GNU:=libunistring/} PKG_OPTS:= dev +PKG_LIBC_DEPENDS:= uclibc eglibc glibc + include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBUNISTRING,libunistring,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) diff --git a/package/m4/Makefile b/package/m4/Makefile index 8cb482904..f7fe684b2 100644 --- a/package/m4/Makefile +++ b/package/m4/Makefile @@ -4,7 +4,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= m4 -PKG_VERSION:= 1.4.16 +PKG_VERSION:= 1.4.17 PKG_RELEASE:= 1 PKG_MD5SUM:= a5dfb4f2b7370e9d34293d23fd09b280 PKG_DESCR:= macro processor diff --git a/package/mdadm/Makefile b/package/mdadm/Makefile index 522a57f51..e2543cf00 100644 --- a/package/mdadm/Makefile +++ b/package/mdadm/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= mdadm -PKG_VERSION:= 3.2.6 +PKG_VERSION:= 3.3 PKG_RELEASE:= 1 -PKG_MD5SUM:= dd2472f07993496ca4f4e3e8f6746517 +PKG_MD5SUM:= f73bf9c6a72cdd644904b287bc9b7c9e PKG_DESCR:= tool for managing Linux Software RAID arrays PKG_SECTION:= fs PKG_URL:= http://neil.brown.name/blog/mdadm diff --git a/package/mdadm/patches/patch-Makefile b/package/mdadm/patches/patch-Makefile index 7e11c9f8a..d8e182c0c 100644 --- a/package/mdadm/patches/patch-Makefile +++ b/package/mdadm/patches/patch-Makefile @@ -1,25 +1,15 @@ ---- mdadm-3.2.5.orig/Makefile 2012-05-18 09:10:03.000000000 +0200 -+++ mdadm-3.2.5/Makefile 2012-07-25 13:51:12.000000000 +0200 -@@ -42,7 +42,7 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix i +--- mdadm-3.3.orig/Makefile 2013-09-03 06:47:47.000000000 +0200 ++++ mdadm-3.3/Makefile 2013-12-31 18:42:30.000000000 +0100 +@@ -43,7 +43,7 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix i CC = $(CROSS_COMPILE)gcc - CXFLAGS = -ggdb + CXFLAGS ?= -ggdb -CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter +CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter ifdef WARN_UNUSED - CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O + CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3 endif -@@ -76,7 +76,8 @@ FAILED_SLOTS_DIR = /run/mdadm/failed-slo - DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\" - DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\" - DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\" --CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS) -+CFLAGS ?= -+CFLAGS += $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS) - - # The glibc TLS ABI requires applications that call clone(2) to set up - # TLS data structures, use pthreads until mdmon implements this support -@@ -231,9 +232,10 @@ $(MON_OBJS) : $(INCL) mdmon.h +@@ -257,9 +257,10 @@ $(MON_OBJS) : $(INCL) mdmon.h sha1.o : sha1.c sha1.h md5.h $(CC) $(CFLAGS) -DHAVE_STDINT_H -o sha1.o -c sha1.c diff --git a/package/ncurses/Makefile b/package/ncurses/Makefile index 0841a9070..2455c9a2f 100644 --- a/package/ncurses/Makefile +++ b/package/ncurses/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ncurses PKG_VERSION:= 5.9 -PKG_RELEASE:= 2 +PKG_RELEASE:= 3 PKG_MD5SUM:= 8cb9c412e5f2d96bc6f459aa8c6282a1 PKG_DESCR:= a terminal handling library PKG_SECTION:= libs @@ -34,6 +34,7 @@ CONFIGURE_ARGS+= --without-cxx \ --enable-symlinks \ --without-ada \ --with-shared \ + --with-termlib \ --without-debug \ --without-profile \ --without-gpm \ @@ -78,7 +79,7 @@ libncurses-install: echo 'GROUP(-lncurses)' >${WRKINST}/usr/lib/libcurses.so # libcurses will not show up in the IPKG, only in STAGING_TARGET_DIR ${INSTALL_DIR} ${IDIR_LIBNCURSES}/usr/lib - ${CP} ${WRKINST}/usr/lib/lib{form,menu,ncurses,panel}.so* \ + ${CP} ${WRKINST}/usr/lib/lib{tinfo,form,menu,ncurses,panel}.so* \ ${IDIR_LIBNCURSES}/usr/lib for ti in rxvt rxvt-unicode; do \ TERMINFO=${WRKINST}/usr/share/terminfo \ diff --git a/package/net-snmp/Makefile b/package/net-snmp/Makefile index 07c90a094..04fed494f 100644 --- a/package/net-snmp/Makefile +++ b/package/net-snmp/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= net-snmp PKG_VERSION:= 5.7.2 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 5bddd02e2f82b62daa79f82717737a14 PKG_DESCR:= SNMP Agent PKG_SECTION:= net/misc diff --git a/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c b/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c index f0be57e78..a4396b963 100644 --- a/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c +++ b/package/net-snmp/patches/patch-agent_mibgroup_mibII_tcpTable_c @@ -1,6 +1,6 @@ ---- net-snmp-5.6.1.orig/agent/mibgroup/mibII/tcpTable.c 2010-10-20 15:12:08.000000000 +0200 -+++ net-snmp-5.6.1/agent/mibgroup/mibII/tcpTable.c 2011-01-12 14:48:14.000000000 +0100 -@@ -33,6 +33,12 @@ +--- net-snmp-5.7.2.orig/agent/mibgroup/mibII/tcpTable.c 2012-10-10 00:28:58.000000000 +0200 ++++ net-snmp-5.7.2/agent/mibgroup/mibII/tcpTable.c 2014-01-01 17:12:30.000000000 +0100 +@@ -34,6 +34,12 @@ #include #include #include @@ -13,7 +13,7 @@ #endif #include -@@ -565,8 +571,8 @@ tcpTable_load_netlink(void) +@@ -579,8 +585,8 @@ tcpTable_load_netlink(void) } if (nl_connect(nl, NETLINK_INET_DIAG) < 0) { @@ -24,7 +24,7 @@ nl_handle_destroy(nl); return -1; } -@@ -580,8 +586,8 @@ tcpTable_load_netlink(void) +@@ -594,8 +600,8 @@ tcpTable_load_netlink(void) nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0); if (nl_send_auto_complete(nl, nm) < 0) { @@ -35,7 +35,7 @@ nl_handle_destroy(nl); return -1; } -@@ -593,8 +599,8 @@ tcpTable_load_netlink(void) +@@ -607,8 +613,8 @@ tcpTable_load_netlink(void) while (running) { if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) { diff --git a/package/net-snmp/patches/patch-agent_mibgroup_util_funcs_get_pid_from_inode_c b/package/net-snmp/patches/patch-agent_mibgroup_util_funcs_get_pid_from_inode_c new file mode 100644 index 000000000..08097feb3 --- /dev/null +++ b/package/net-snmp/patches/patch-agent_mibgroup_util_funcs_get_pid_from_inode_c @@ -0,0 +1,10 @@ +--- net-snmp-5.7.2.orig/agent/mibgroup/util_funcs/get_pid_from_inode.c 2012-10-10 00:28:58.000000000 +0200 ++++ net-snmp-5.7.2/agent/mibgroup/util_funcs/get_pid_from_inode.c 2014-01-01 17:29:08.000000000 +0100 +@@ -6,6 +6,7 @@ + + #include + #include ++#include + #if HAVE_STDLIB_H + #include + #endif diff --git a/package/net-snmp/patches/patch-net-snmp-config_in b/package/net-snmp/patches/patch-net-snmp-config_in index 2465be023..7e0623ad7 100644 --- a/package/net-snmp/patches/patch-net-snmp-config_in +++ b/package/net-snmp/patches/patch-net-snmp-config_in @@ -1,6 +1,6 @@ ---- net-snmp-5.6.1.orig/net-snmp-config.in 2010-10-13 11:58:34.000000000 +0200 -+++ net-snmp-5.6.1/net-snmp-config.in 2011-01-21 18:05:18.494919068 +0100 -@@ -127,10 +127,10 @@ else +--- net-snmp-5.7.2.orig/net-snmp-config.in 2012-10-10 00:28:58.000000000 +0200 ++++ net-snmp-5.7.2/net-snmp-config.in 2014-01-01 17:12:30.000000000 +0100 +@@ -138,10 +138,10 @@ else ;; #################################################### compile --base-cflags) diff --git a/package/oprofile/Makefile b/package/oprofile/Makefile index 63724cbdb..1d4278fd0 100644 --- a/package/oprofile/Makefile +++ b/package/oprofile/Makefile @@ -15,6 +15,7 @@ PKG_URL:= http://oprofile.sourceforge.net/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=oprofile/} PKG_ARCH_DEPENDS:= !cris !avr32 !m68k +PKG_LIBC_DEPENDS:= uclibc eglibc glibc PKG_CFLINE_OPROFILE:= select BUSYBOX_EXPR @@ -23,7 +24,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,OPROFILE,oprofile,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TARGET_LDFLAGS+= -lpthread -CONFIGURE_ARGS+= --with-kernel-support oprofile-install: $(INSTALL_DIR) $(IDIR_OPROFILE)/usr/{bin,share} diff --git a/package/orbit2/Makefile b/package/orbit2/Makefile index 618841d7d..15cc231ee 100644 --- a/package/orbit2/Makefile +++ b/package/orbit2/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= ORBit2 PKG_VERSION:= 2.14.19 PKG_EXTRAVER:= 2.14 -PKG_RELEASE:= 3 +PKG_RELEASE:= 4 PKG_MD5SUM:= 87c69c56c6d0bdafa4de5e18ae115cc9 PKG_DESCR:= a CORBA 2.4-compliant Object Request Broker PKG_SECTION:= libs @@ -22,8 +22,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,ORBIT2,orbit2,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CFLAGS_FOR_BUILD+= $(shell PATH=$(TARGET_PATH) libIDL-config-2 --cflags) -LDFLAGS_FOR_BUILD+= $(shell PATH=$(TARGET_PATH) libIDL-config-2 --libs) +CFLAGS_FOR_BUILD+= $(shell PATH=$(HOST_PATH) libIDL-config-2 --cflags) +LDFLAGS_FOR_BUILD+= $(shell PATH=$(HOST_PATH) libIDL-config-2 --libs) LDFLAGS_FOR_BUILD+= -lgmodule-2.0 CONFIGURE_ENV+= ac_cv_alignof_CORBA_octet=1 \ ac_cv_alignof_CORBA_boolean=1 \ @@ -43,9 +43,6 @@ orbit2-install: $(INSTALL_DIR) $(IDIR_ORBIT2)/usr/lib $(INSTALL_BIN) $(WRKINST)/usr/lib/libORBit*.so* \ $(IDIR_ORBIT2)/usr/lib - $(INSTALL_DIR) $(IDIR_ORBIT2)/usr/bin - $(CP) $(WRKINST)/usr/bin/orbit-idl-2 \ - $(IDIR_ORBIT2)/usr/bin $(INSTALL_DIR) $(STAGING_DIR)/usr/bin $(CP) $(WRKINST)/usr/bin/orbit-idl-2 \ $(STAGING_DIR)/usr/bin diff --git a/package/orbit2/patches/patch-src_idl-compiler_Makefile_in b/package/orbit2/patches/patch-src_idl-compiler_Makefile_in index 2053d9f29..ec73ef4f3 100644 --- a/package/orbit2/patches/patch-src_idl-compiler_Makefile_in +++ b/package/orbit2/patches/patch-src_idl-compiler_Makefile_in @@ -33,15 +33,6 @@ ORBIT_LIBS = @ORBIT_LIBS@ ORBIT_MAJOR_VERSION = @ORBIT_MAJOR_VERSION@ ORBIT_MICRO_VERSION = @ORBIT_MICRO_VERSION@ -@@ -199,7 +197,7 @@ PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ - PKG_CONFIG = @PKG_CONFIG@ --PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -+PKG_CONFIG_LIBDIR = $(PKG_HOSTLIB_DIR) - PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ - RANLIB = @RANLIB@ - SED = @SED@ @@ -270,8 +268,7 @@ INCLUDES = \ -DVERSION=\"$(ORBIT_VERSION)\" \ -DORBIT2_INTERNAL_API \ diff --git a/package/portsentry/Makefile b/package/portsentry/Makefile index 19a46f0e0..a68b55593 100644 --- a/package/portsentry/Makefile +++ b/package/portsentry/Makefile @@ -12,6 +12,8 @@ PKG_SECTION:= net/security PKG_URL:= http://sourceforge.net/projects/sentrytools PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=sentrytools/} +PKG_LIBC_DEPENDS:= uclibc eglibc glibc + WRKDIST= ${WRKDIR}/${PKG_NAME}_beta include ${TOPDIR}/mk/package.mk diff --git a/package/quagga/Makefile b/package/quagga/Makefile index 99de25ba4..59135aeb0 100644 --- a/package/quagga/Makefile +++ b/package/quagga/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= quagga -PKG_VERSION:= 0.99.17 +PKG_VERSION:= 0.99.22.4 PKG_RELEASE:= 1 -PKG_MD5SUM:= 37b9022adca04b03863d2d79787e643f +PKG_MD5SUM:= 27ef98abb1820bae19eb71f631a10853 PKG_DESCR:= A routing software package PKG_SECTION:= route PKG_BUILDDEP:= readline ncurses diff --git a/package/quagga/patches/patch-configure b/package/quagga/patches/patch-configure deleted file mode 100644 index 3780d661a..000000000 --- a/package/quagga/patches/patch-configure +++ /dev/null @@ -1,20 +0,0 @@ ---- quagga-0.99.17.orig/configure 2010-08-19 11:43:02.000000000 +0200 -+++ quagga-0.99.17/configure 2011-02-16 22:51:51.000000000 +0100 -@@ -14188,7 +14188,7 @@ if test "${ac_cv_func_malloc_0_nonnull+s - $as_echo_n "(cached) " >&6 - else - if test "$cross_compiling" = yes; then : -- ac_cv_func_malloc_0_nonnull=no -+ ac_cv_func_malloc_0_nonnull=yes - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ -@@ -14640,7 +14640,7 @@ if test "${ac_cv_func_realloc_0_nonnull+ - $as_echo_n "(cached) " >&6 - else - if test "$cross_compiling" = yes; then : -- ac_cv_func_realloc_0_nonnull=no -+ ac_cv_func_realloc_0_nonnull=yes - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ diff --git a/package/quagga/patches/patch-lib_queue_h b/package/quagga/patches/patch-lib_queue_h new file mode 100644 index 000000000..2a2ce12ac --- /dev/null +++ b/package/quagga/patches/patch-lib_queue_h @@ -0,0 +1,11 @@ +--- quagga-0.99.22.4.orig/lib/queue.h 2013-08-04 15:01:38.000000000 +0200 ++++ quagga-0.99.22.4/lib/queue.h 2013-12-30 19:57:25.000000000 +0100 +@@ -33,8 +33,6 @@ + #ifndef _SYS_QUEUE_H_ + #define _SYS_QUEUE_H_ + +-#include +- + /* + * This file defines four types of data structures: singly-linked lists, + * singly-linked tail queues, lists and tail queues. diff --git a/package/quagga/patches/patch-lib_sockopt_c b/package/quagga/patches/patch-lib_sockopt_c new file mode 100644 index 000000000..c33333766 --- /dev/null +++ b/package/quagga/patches/patch-lib_sockopt_c @@ -0,0 +1,23 @@ +--- quagga-0.99.22.4.orig/lib/sockopt.c 2013-04-14 14:46:07.000000000 +0200 ++++ quagga-0.99.22.4/lib/sockopt.c 2013-12-30 19:56:54.000000000 +0100 +@@ -24,6 +24,20 @@ + #include "sockopt.h" + #include "sockunion.h" + ++#if !defined(__GLIBC__) ++/* For TCP_MD5SIG socket option. */ ++#define TCP_MD5SIG_MAXKEYLEN 80 ++ ++struct tcp_md5sig ++{ ++ struct sockaddr_storage tcpm_addr; /* Address associated. */ ++ u_int16_t __tcpm_pad1; /* Zero. */ ++ u_int16_t tcpm_keylen; /* Key length. */ ++ u_int32_t __tcpm_pad2; /* Zero. */ ++ u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ ++}; ++#endif ++ + int + setsockopt_so_recvbuf (int sock, int size) + { diff --git a/package/quagga/patches/patch-lib_zebra_h b/package/quagga/patches/patch-lib_zebra_h new file mode 100644 index 000000000..160b4cc20 --- /dev/null +++ b/package/quagga/patches/patch-lib_zebra_h @@ -0,0 +1,10 @@ +--- quagga-0.99.22.4.orig/lib/zebra.h 2013-09-02 14:53:04.000000000 +0200 ++++ quagga-0.99.22.4/lib/zebra.h 2013-12-30 19:58:14.000000000 +0100 +@@ -51,7 +51,6 @@ typedef int socklen_t; + #ifdef HAVE_STROPTS_H + #include + #endif /* HAVE_STROPTS_H */ +-#include + #ifdef HAVE_SYS_SELECT_H + #include + #endif /* HAVE_SYS_SELECT_H */ diff --git a/package/quagga/patches/patch-ltmain_sh b/package/quagga/patches/patch-ltmain_sh deleted file mode 100644 index c6711472d..000000000 --- a/package/quagga/patches/patch-ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- quagga-0.99.17.orig/ltmain.sh 2010-08-19 11:43:02.000000000 +0200 -+++ quagga-0.99.17/ltmain.sh 2011-01-16 22:05:52.000000000 +0100 -@@ -4765,7 +4765,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/package/quagga/patches/patch-redhat_quagga_spec b/package/quagga/patches/patch-redhat_quagga_spec deleted file mode 100644 index bf00ca130..000000000 --- a/package/quagga/patches/patch-redhat_quagga_spec +++ /dev/null @@ -1,11 +0,0 @@ ---- quagga-0.99.17.orig/redhat/quagga.spec 2010-08-19 11:44:45.000000000 +0200 -+++ quagga-0.99.17/redhat/quagga.spec 2011-01-16 22:05:02.000000000 +0100 -@@ -90,7 +90,7 @@ - Summary: Routing daemon - Name: quagga - Version: 0.99.17 --Release: 20100819%{release_rev} -+Release: 20110116%{release_rev} - License: GPL - Group: System Environment/Daemons - Source0: http://www.quagga.net/snapshots/cvs/%{name}-%{version}.tar.gz diff --git a/package/quagga/patches/patch-vtysh_extract_pl b/package/quagga/patches/patch-vtysh_extract_pl deleted file mode 100644 index dc3229fd2..000000000 --- a/package/quagga/patches/patch-vtysh_extract_pl +++ /dev/null @@ -1,8 +0,0 @@ ---- quagga-0.99.17.orig/vtysh/extract.pl 2010-08-19 11:44:45.000000000 +0200 -+++ quagga-0.99.17/vtysh/extract.pl 2011-01-16 22:05:03.000000000 +0100 -@@ -1,4 +1,4 @@ --#! -+#! /opt/local/bin/perl - ## - ## vtysh/extract.pl. Generated from extract.pl.in by configure. - ## diff --git a/package/rdate/Makefile b/package/rdate/Makefile index 140857170..619b5ad6a 100644 --- a/package/rdate/Makefile +++ b/package/rdate/Makefile @@ -18,6 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RDATE,rdate,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIG_STYLE:= manual +TARGET_CPPFLAGS+= -D_GNU_SOURCE MAKE_FILE= GNUmakefile rdate-install: diff --git a/package/rdate/patches/patch-ntp_c b/package/rdate/patches/patch-ntp_c new file mode 100644 index 000000000..d36d421cd --- /dev/null +++ b/package/rdate/patches/patch-ntp_c @@ -0,0 +1,50 @@ +--- rdate.orig/ntp.c 2007-08-17 17:03:24.000000000 +0200 ++++ rdate/ntp.c 2013-12-30 23:07:06.000000000 +0100 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -100,9 +101,9 @@ struct ntp_data { + double transmit; + double current; + double originate; +- u_int64_t xmitck; +- u_int64_t recvck; +- u_int32_t refid; ++ uint64_t xmitck; ++ uint64_t recvck; ++ uint32_t refid; + u_char status; + u_char version; + u_char mode; +@@ -268,7 +269,7 @@ write_packet(int fd, struct ntp_data *da + + packet[0] = ((nver ? nver : NTP_VERSION) << 3) | (NTP_MODE_CLIENT); + +- data->xmitck = (u_int64_t)arc4random() << 32 | arc4random(); ++ data->xmitck = (uint64_t)arc4random() << 32 | arc4random(); + + /* + * Send out a random 64-bit number as our transmit time. The NTP +@@ -286,7 +287,7 @@ write_packet(int fd, struct ntp_data *da + * the transmit field intelligible. + */ + +- memcpy(packet + NTP_TRANSMIT, &data->xmitck, sizeof (u_int64_t)); ++ memcpy(packet + NTP_TRANSMIT, &data->xmitck, sizeof (uint64_t)); + + data->originate = current_time(JAN_1970); + +@@ -437,7 +438,7 @@ unpack_ntp(struct ntp_data *data, u_char + data->transmit = d / NTP_SCALE; + + /* See write_packet for why this isn't an endian problem. */ +- memcpy(&data->recvck, packet + NTP_ORIGINATE, sizeof (u_int64_t)); ++ memcpy(&data->recvck, packet + NTP_ORIGINATE, sizeof (uint64_t)); + } + + /* diff --git a/package/rdate/patches/patch-rdate_h b/package/rdate/patches/patch-rdate_h new file mode 100644 index 000000000..33c4f1b3a --- /dev/null +++ b/package/rdate/patches/patch-rdate_h @@ -0,0 +1,11 @@ +--- rdate.orig/rdate.h 2007-08-16 12:38:52.000000000 +0200 ++++ rdate/rdate.h 2013-12-30 23:00:23.000000000 +0100 +@@ -10,7 +10,7 @@ + #endif + + #ifdef EXT_A4R +-extern u_int32_t arc4random(void); ++extern uint32_t arc4random(void); + #endif + + #ifdef __MirBSD__ diff --git a/package/rdate/patches/patch-rfc868time_c b/package/rdate/patches/patch-rfc868time_c new file mode 100644 index 000000000..b095278ba --- /dev/null +++ b/package/rdate/patches/patch-rfc868time_c @@ -0,0 +1,11 @@ +--- rdate.orig/rfc868time.c 2007-08-11 01:52:47.000000000 +0200 ++++ rdate/rfc868time.c 2013-12-30 23:07:29.000000000 +0100 +@@ -70,7 +70,7 @@ rfc868time_client (const char *hostname, + { + struct addrinfo hints, *res0, *res; + struct timeval old; +- u_int32_t tim; /* RFC 868 states clearly this is an uint32 */ ++ uint32_t tim; /* RFC 868 states clearly this is an uint32 */ + int s; + int error; + diff --git a/package/rtmpdump/patches/patch-Makefile.orig b/package/rtmpdump/patches/patch-Makefile.orig deleted file mode 100644 index 9b10246bb..000000000 --- a/package/rtmpdump/patches/patch-Makefile.orig +++ /dev/null @@ -1,28 +0,0 @@ ---- rtmpdump-2.4.orig/Makefile 2013-12-15 14:24:48.000000000 +0100 -+++ rtmpdump-2.4/Makefile 2013-12-15 15:17:36.000000000 +0100 -@@ -1,9 +1,9 @@ - VERSION=v2.4 - --prefix=/usr/local -+prefix=/usr - --CC=$(CROSS_COMPILE)gcc --LD=$(CROSS_COMPILE)ld -+CC=$(CROSS)gcc -+LD=$(CROSS)ld - - SYS=posix - #SYS=mingw -@@ -21,8 +21,10 @@ CRYPTO_DEF=$(DEF_$(CRYPTO)) - - DEF=-DRTMPDUMP_VERSION=\"$(VERSION)\" $(CRYPTO_DEF) $(XDEF) - OPT=-O2 --CFLAGS=-Wall $(XCFLAGS) $(INC) $(DEF) $(OPT) --LDFLAGS=-Wall $(XLDFLAGS) -+CFLAGS?= -+CFLAGS+=-Wall $(XCFLAGS) $(INC) $(DEF) -+LDFLAGS?= -+LDFLAGS+=-Wall $(XLDFLAGS) - - bindir=$(prefix)/bin - sbindir=$(prefix)/sbin diff --git a/package/scsi-spin/src/scsi-spin.c b/package/scsi-spin/src/scsi-spin.c index 443934c78..b92347ff4 100644 --- a/package/scsi-spin/src/scsi-spin.c +++ b/package/scsi-spin/src/scsi-spin.c @@ -31,6 +31,7 @@ #include #include #include +#include #define SCSI_DISK_MAJOR(M) ((M) == SCSI_DISK0_MAJOR || \ ((M) >= SCSI_DISK1_MAJOR && \ @@ -203,8 +204,8 @@ is_mounted( const char* device, int use_proc, int devmaj, int devmin ) struct stat devstat; int mounted = 0; struct { - __uint32_t dev_id; - __uint32_t host_unique_id; + uint32_t dev_id; + uint32_t host_unique_id; } scsi_dev_id, scsi_id; FILE *mtab; char *mtabfile = use_proc ? "/proc/mounts" : "/etc/mtab"; diff --git a/package/tinc/Makefile b/package/tinc/Makefile index 9e5d8b06b..f5c558bb0 100644 --- a/package/tinc/Makefile +++ b/package/tinc/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= tinc -PKG_VERSION:= 1.0.11 +PKG_VERSION:= 1.0.23 PKG_RELEASE:= 1 -PKG_MD5SUM:= ee0b1a3366c6e379cae34be6fa5dcb15 +PKG_MD5SUM:= 762c0d47bdf1b33a40b19165d9c2761f PKG_DESCR:= VPN tunnel daemon PKG_SECTION:= net/security PKG_DEPENDS:= zlib liblzo libopenssl kmod-tun @@ -18,8 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,TINC,tinc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_ARGS+= --with-kernel=${LINUX_DIR} \ - --with-zlib=${STAGING_TARGET_DIR}/usr/ \ +CONFIGURE_ARGS+= --with-zlib=${STAGING_TARGET_DIR}/usr/ \ --with-lzo-include=${STAGING_TARGET_DIR}/usr/include/lzo tinc-install: diff --git a/package/tinc/patches/patch-src_Makefile_in b/package/tinc/patches/patch-src_Makefile_in deleted file mode 100644 index 49bcf90dc..000000000 --- a/package/tinc/patches/patch-src_Makefile_in +++ /dev/null @@ -1,11 +0,0 @@ ---- tinc-1.0.11.orig/src/Makefile.in 2009-11-01 16:23:33.000000000 +0100 -+++ tinc-1.0.11/src/Makefile.in 2011-01-21 23:31:11.568658762 +0100 -@@ -197,7 +197,7 @@ noinst_HEADERS = conf.h connection.h dev - tincd_LDADD = \ - $(top_builddir)/lib/libvpn.a - --AM_CFLAGS = @CFLAGS@ -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -+AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" - all: all-am - - .SUFFIXES: diff --git a/package/tinc/patches/patch-src_have_h b/package/tinc/patches/patch-src_have_h new file mode 100644 index 000000000..4efd602ac --- /dev/null +++ b/package/tinc/patches/patch-src_have_h @@ -0,0 +1,25 @@ +--- tinc-1.0.23.orig/src/have.h 2013-09-25 21:21:09.000000000 +0200 ++++ tinc-1.0.23/src/have.h 2013-12-30 19:30:24.000000000 +0100 +@@ -175,9 +175,11 @@ + #include + #endif + ++#if defined(__GLIBC__) + #ifdef HAVE_NET_ETHERNET_H + #include + #endif ++#endif + + #ifdef HAVE_NET_IF_ARP_H + #include +@@ -191,8 +193,10 @@ + #include + #endif + ++#if defined(__GLIBC__) + #ifdef HAVE_NETINET_IF_ETHER_H + #include + #endif ++#endif + + #endif /* __TINC_SYSTEM_H__ */ diff --git a/package/tinc/patches/patch-src_linux_device_c b/package/tinc/patches/patch-src_linux_device_c deleted file mode 100644 index 9a5c09059..000000000 --- a/package/tinc/patches/patch-src_linux_device_c +++ /dev/null @@ -1,20 +0,0 @@ ---- tinc-1.0.11.orig/src/linux/device.c 2009-09-27 12:27:54.000000000 +0200 -+++ tinc-1.0.11/src/linux/device.c 2009-12-06 02:30:32.000000000 +0100 -@@ -61,7 +61,7 @@ bool setup_device(void) { - if (netname != NULL) - iface = xstrdup(netname); - #else -- iface = xstrdup(rindex(device, '/') ? rindex(device, '/') + 1 : device); -+ iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device); - #endif - device_fd = open(device, O_RDWR | O_NONBLOCK); - -@@ -105,7 +105,7 @@ bool setup_device(void) { - device_type = DEVICE_TYPE_ETHERTAP; - if(iface) - free(iface); -- iface = xstrdup(rindex(device, '/') ? rindex(device, '/') + 1 : device); -+ iface = xstrdup(strrchr(device, '/') ? strrchr(device, '/') + 1 : device); - } - - logger(LOG_INFO, "%s is a %s", device, device_info); diff --git a/package/vnc-reflector/Makefile b/package/vnc-reflector/Makefile index 33b54fcd5..3be33a3a7 100644 --- a/package/vnc-reflector/Makefile +++ b/package/vnc-reflector/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= vnc-reflector PKG_VERSION:= 1.2.4 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= c3f88bc62f228b335c25c07f9744ab0c PKG_DESCR:= specialized VNC server which acts as a proxy PKG_SECTION:= proxy diff --git a/package/vnc-reflector/patches/patch-actions_c b/package/vnc-reflector/patches/patch-actions_c new file mode 100644 index 000000000..afce6980c --- /dev/null +++ b/package/vnc-reflector/patches/patch-actions_c @@ -0,0 +1,10 @@ +--- vnc_reflector.orig/actions.c 2003-04-21 19:20:35.000000000 +0200 ++++ vnc_reflector/actions.c 2013-12-31 17:43:24.000000000 +0100 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "rfblib.h" + #include "reflector.h" diff --git a/package/vnc-reflector/patches/patch-active_c b/package/vnc-reflector/patches/patch-active_c new file mode 100644 index 000000000..b8385de9e --- /dev/null +++ b/package/vnc-reflector/patches/patch-active_c @@ -0,0 +1,10 @@ +--- vnc_reflector.orig/active.c 2003-04-21 19:20:35.000000000 +0200 ++++ vnc_reflector/active.c 2013-12-31 17:44:10.000000000 +0100 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + #include "rfblib.h" + #include "reflector.h" diff --git a/package/vnc-reflector/patches/patch-region_c b/package/vnc-reflector/patches/patch-region_c new file mode 100644 index 000000000..4aa2d4c60 --- /dev/null +++ b/package/vnc-reflector/patches/patch-region_c @@ -0,0 +1,10 @@ +--- vnc_reflector.orig/region.c 2002-09-21 14:43:01.000000000 +0200 ++++ vnc_reflector/region.c 2013-12-31 17:45:02.000000000 +0100 +@@ -73,6 +73,7 @@ SOFTWARE. + #include + #include + #include ++#include + + /* Get definitions for CARD16 etc. */ + #include "rfblib.h" diff --git a/package/wifidog/Makefile b/package/wifidog/Makefile index 2b38090af..5971eadc6 100644 --- a/package/wifidog/Makefile +++ b/package/wifidog/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= wifidog PKG_VERSION:= 1.1.5 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= abe5f7123179a0f08c493ce59fb3cb31 PKG_DESCR:= a complete and embeddable captive portal PKG_SECTION:= wifi diff --git a/package/wifidog/patches/patch-libhttpd_api_c b/package/wifidog/patches/patch-libhttpd_api_c index db790195b..6c76235fb 100644 --- a/package/wifidog/patches/patch-libhttpd_api_c +++ b/package/wifidog/patches/patch-libhttpd_api_c @@ -1,6 +1,6 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- wifidog-1.1.5.orig/libhttpd/api.c 2007-11-01 21:04:20.000000000 +0100 -+++ wifidog-1.1.5/libhttpd/api.c 2008-10-16 13:15:26.000000000 +0200 ++++ wifidog-1.1.5/libhttpd/api.c 2014-01-01 16:20:22.000000000 +0100 @@ -166,7 +166,7 @@ int httpdAddVariable(request *r, char *n while(*name == ' ' || *name == '\t') name++; @@ -173,7 +173,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ newEntry->name = NULL; newEntry->type = HTTP_WILDCARD; newEntry->indexFlag = HTTP_FALSE; -@@ -755,7 +755,7 @@ int httpdAddCContent(server, dir, name, +@@ -755,7 +755,7 @@ int httpdAddCContent(server, dir, name, newEntry = malloc(sizeof(httpContent)); if (newEntry == NULL) return(-1); @@ -200,7 +200,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ newEntry->name = strdup(name); newEntry->type = HTTP_STATIC; newEntry->indexFlag = indexFlag; -@@ -946,7 +946,7 @@ void httpdProcessRequest(httpd *server, +@@ -946,7 +946,7 @@ void httpdProcessRequest(httpd *server, r->response.responseLength = 0; strncpy(dirName, httpdRequestPath(r), HTTP_MAX_URL); diff --git a/package/wifidog/patches/patch-libhttpd_ip_acl_c b/package/wifidog/patches/patch-libhttpd_ip_acl_c index 932855b5d..95642f2b6 100644 --- a/package/wifidog/patches/patch-libhttpd_ip_acl_c +++ b/package/wifidog/patches/patch-libhttpd_ip_acl_c @@ -1,7 +1,17 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- wifidog-1.1.5.orig/libhttpd/ip_acl.c 2007-03-12 20:37:06.000000000 +0100 -+++ wifidog-1.1.5/libhttpd/ip_acl.c 2008-10-16 13:12:15.000000000 +0200 -@@ -52,22 +52,22 @@ static int scanCidr(val, result, length) ++++ wifidog-1.1.5/libhttpd/ip_acl.c 2014-01-01 16:34:21.000000000 +0100 +@@ -44,30 +44,30 @@ + + static int scanCidr(val, result, length) + char *val; +- u_int *result, ++ unsigned int *result, + *length; + { +- u_int res, res1, res2, res3, res4, res5; ++ unsigned int res, res1, res2, res3, res4, res5; + char *cp; cp = val; res1 = atoi(cp); diff --git a/package/wifidog/patches/patch-libhttpd_protocol_c b/package/wifidog/patches/patch-libhttpd_protocol_c index 767337dd6..6770fc729 100644 --- a/package/wifidog/patches/patch-libhttpd_protocol_c +++ b/package/wifidog/patches/patch-libhttpd_protocol_c @@ -1,7 +1,15 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- wifidog-1.1.5.orig/libhttpd/protocol.c 2007-11-01 21:04:20.000000000 +0100 -+++ wifidog-1.1.5/libhttpd/protocol.c 2008-10-16 13:12:58.000000000 +0200 -@@ -83,7 +83,7 @@ int _httpd_readChar(request *r, char *cp ++++ wifidog-1.1.5/libhttpd/protocol.c 2014-01-01 16:29:50.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -83,7 +84,7 @@ int _httpd_readChar(request *r, char *cp { if (r->readBufRemain == 0) { @@ -10,7 +18,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ r->readBufRemain = _httpd_net_read(r->clientSock, r->readBuf, HTTP_READ_BUF_LEN); if (r->readBufRemain < 1) -@@ -352,7 +352,7 @@ void _httpd_storeData(request *r, char * +@@ -352,7 +353,7 @@ void _httpd_storeData(request *r, char * cp = query; cp2 = var; @@ -19,7 +27,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ val = NULL; while(*cp) { -@@ -483,7 +483,7 @@ httpDir *_httpd_findContentDir(server, d +@@ -483,7 +484,7 @@ httpDir *_httpd_findContentDir(server, d if (createFlag == HTTP_TRUE) { curChild = malloc(sizeof(httpDir)); @@ -28,7 +36,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ curChild->name = strdup(curDir); curChild->next = curItem->children; curItem->children = curChild; -@@ -606,7 +606,7 @@ void _httpd_sendFile(httpd *server, requ +@@ -606,7 +607,7 @@ void _httpd_sendFile(httpd *server, requ char *suffix; struct stat sbuf; @@ -37,7 +45,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ if (suffix != NULL) { if (strcasecmp(suffix,".gif") == 0) -@@ -699,7 +699,7 @@ char *_httpd_escape(str) +@@ -699,7 +700,7 @@ char *_httpd_escape(str) if (!ACCEPTABLE((unsigned char)*p)) unacceptable +=2; result = (char *) malloc(p-str + unacceptable + 1); diff --git a/package/wifidog/patches/patch-src_client_list_c b/package/wifidog/patches/patch-src_client_list_c new file mode 100644 index 000000000..ac78a1af6 --- /dev/null +++ b/package/wifidog/patches/patch-src_client_list_c @@ -0,0 +1,11 @@ +--- wifidog-1.1.5.orig/src/client_list.c 2007-03-12 20:36:41.000000000 +0100 ++++ wifidog-1.1.5/src/client_list.c 2014-01-01 17:02:32.000000000 +0100 +@@ -35,7 +35,7 @@ + #include + #include + #include +-#include ++#include + + #include + diff --git a/package/wifidog/patches/patch-src_firewall_c b/package/wifidog/patches/patch-src_firewall_c new file mode 100644 index 000000000..0ebe0457c --- /dev/null +++ b/package/wifidog/patches/patch-src_firewall_c @@ -0,0 +1,11 @@ +--- wifidog-1.1.5.orig/src/firewall.c 2007-11-01 21:04:20.000000000 +0100 ++++ wifidog-1.1.5/src/firewall.c 2014-01-01 16:47:55.000000000 +0100 +@@ -37,7 +37,7 @@ + #include + #include + #include +-#include ++#include + + #include + diff --git a/package/wifidog/patches/patch-src_util_c b/package/wifidog/patches/patch-src_util_c new file mode 100644 index 000000000..c4c26926f --- /dev/null +++ b/package/wifidog/patches/patch-src_util_c @@ -0,0 +1,11 @@ +--- wifidog-1.1.5.orig/src/util.c 2007-11-01 21:04:20.000000000 +0100 ++++ wifidog-1.1.5/src/util.c 2014-01-01 17:11:39.000000000 +0100 +@@ -37,7 +37,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + diff --git a/package/xfsprogs/Makefile b/package/xfsprogs/Makefile index 42fd4efba..ceb1f82e1 100644 --- a/package/xfsprogs/Makefile +++ b/package/xfsprogs/Makefile @@ -15,7 +15,7 @@ PKG_URL:= http://oss.sgi.com/projects/xfs PKG_SITES:= ftp://oss.sgi.com/projects/xfs/cmd_tars/ \ ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/ -PKG_LIBC_DEPENDS:= eglibc glibc musl +PKG_LIBC_DEPENDS:= eglibc glibc PKG_TARGET_DEPENDS:= !atmel-ngw100 include ${TOPDIR}/mk/package.mk -- cgit v1.2.3 From 4881da11df564c8c989ade4e223b31ee8a993776 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 3 Jan 2014 17:55:30 +0100 Subject: another bunch of musl fixes, and some libtinfo fixes --- package/ctorrent/Makefile | 2 +- package/ctorrent/patches/patch-compat_c | 13 +++++++++++++ package/deco/Makefile | 3 ++- .../hostapd/patches/patch-src_drivers_linux_wext_h | 19 +++++++++++++++++++ package/iftop/Makefile | 2 ++ package/kismet/Makefile | 2 +- package/kismet/patches/patch-dumpfile_tuntap_h | 18 ++++++++++++++++++ package/lame/Makefile | 1 + package/libshout/Makefile | 10 +++++----- package/libshout/patches/patch-ltmain_sh | 11 ----------- package/m4/Makefile | 2 +- package/m4/patches/patch-lib_stdio_in_h | 13 ------------- package/nano/Makefile | 20 +++++++------------- package/ntpclient/patches/patch-ntpclient_c | 11 +++++++++++ package/open-iscsi/patches/patch-usr_idbm_c | 10 ++++++++++ package/open-iscsi/patches/patch-usr_mgmt_ipc_c | 4 ++-- .../osiris/patches/patch-src_libosiris_Makefile_in | 4 ++-- .../osiris/patches/patch-src_libosiris_osi_common_h | 10 ++++++++++ package/procps/Makefile | 1 + package/proftpd/Makefile | 7 +++++-- package/rdesktop/Makefile | 3 ++- package/util-linux/Makefile | 2 +- package/xterm/Makefile | 3 ++- 23 files changed, 116 insertions(+), 55 deletions(-) create mode 100644 package/ctorrent/patches/patch-compat_c create mode 100644 package/hostapd/patches/patch-src_drivers_linux_wext_h create mode 100644 package/kismet/patches/patch-dumpfile_tuntap_h delete mode 100644 package/libshout/patches/patch-ltmain_sh delete mode 100644 package/m4/patches/patch-lib_stdio_in_h create mode 100644 package/ntpclient/patches/patch-ntpclient_c create mode 100644 package/open-iscsi/patches/patch-usr_idbm_c create mode 100644 package/osiris/patches/patch-src_libosiris_osi_common_h (limited to 'package') diff --git a/package/ctorrent/Makefile b/package/ctorrent/Makefile index 470e159ca..ab59739bd 100755 --- a/package/ctorrent/Makefile +++ b/package/ctorrent/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= ctorrent PKG_VERSION:= dnh3.3.2 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 59b23dd05ff70791cd6449effa7fc3b6 PKG_DESCR:= console-based BitTorrent client PKG_SECTION:= p2p diff --git a/package/ctorrent/patches/patch-compat_c b/package/ctorrent/patches/patch-compat_c new file mode 100644 index 000000000..44408b5db --- /dev/null +++ b/package/ctorrent/patches/patch-compat_c @@ -0,0 +1,13 @@ +--- ctorrent-dnh3.3.2.orig/compat.c 2008-06-15 02:00:19.000000000 +0200 ++++ ctorrent-dnh3.3.2/compat.c 2014-01-02 18:21:09.000000000 +0100 +@@ -67,8 +67,8 @@ int snprintf(char *str, size_t size, con + char *strnstr(const char *haystack, const char *needle, size_t haystacklen) + { + char *p; +- ssize_t plen; +- ssize_t len = strlen(needle); ++ size_t plen; ++ size_t len = strlen(needle); + + if( *needle == '\0' ) + return (char *)haystack; diff --git a/package/deco/Makefile b/package/deco/Makefile index 5aa535a9d..aa8ba0402 100644 --- a/package/deco/Makefile +++ b/package/deco/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= deco PKG_VERSION:= 39 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= f77f60e8be0cae1f814cba1ef61bf4d0 PKG_DESCR:= Text-based, full featured file manager PKG_SECTION:= misc @@ -20,6 +20,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,DECO,deco,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_LDFLAGS+= -ltinfo INSTALL_STYLE:= manual do-install: diff --git a/package/hostapd/patches/patch-src_drivers_linux_wext_h b/package/hostapd/patches/patch-src_drivers_linux_wext_h new file mode 100644 index 000000000..f09fa321e --- /dev/null +++ b/package/hostapd/patches/patch-src_drivers_linux_wext_h @@ -0,0 +1,19 @@ +--- hostapd-2.0.orig/src/drivers/linux_wext.h 2013-01-12 16:42:53.000000000 +0100 ++++ hostapd-2.0/src/drivers/linux_wext.h 2014-01-02 16:26:15.000000000 +0100 +@@ -21,11 +21,11 @@ + + #include + #include +-typedef __uint32_t __u32; +-typedef __int32_t __s32; +-typedef __uint16_t __u16; +-typedef __int16_t __s16; +-typedef __uint8_t __u8; ++typedef uint32_t __u32; ++typedef int32_t __s32; ++typedef uint16_t __u16; ++typedef int16_t __s16; ++typedef uint8_t __u8; + #ifndef __user + #define __user + #endif /* __user */ diff --git a/package/iftop/Makefile b/package/iftop/Makefile index cbe15eb62..0d50f685c 100644 --- a/package/iftop/Makefile +++ b/package/iftop/Makefile @@ -18,6 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IFTOP,iftop,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_LDFLAGS+= -ltinfo + iftop-install: ${INSTALL_DIR} ${IDIR_IFTOP}/usr/bin ${INSTALL_BIN} ${WRKINST}/usr/sbin/iftop ${IDIR_IFTOP}/usr/bin/ diff --git a/package/kismet/Makefile b/package/kismet/Makefile index df52c74b8..110f6f78d 100644 --- a/package/kismet/Makefile +++ b/package/kismet/Makefile @@ -29,7 +29,7 @@ $(eval $(call PKG_template,KISMET_DRONE,kismet-drone,${PKG_VERSION}-${PKG_RELEAS $(eval $(call PKG_template,KISMET_SERVER,kismet-server,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_KISMET_SERVER},${PKG_SECTION})) AUTOTOOL_STYLE:= autoreconf -TARGET_LDFLAGS+= -lpthread +TARGET_LDFLAGS+= -lpthread -ltinfo CONFIGURE_ARGS+= --sysconfdir=/etc/kismet pre-build: diff --git a/package/kismet/patches/patch-dumpfile_tuntap_h b/package/kismet/patches/patch-dumpfile_tuntap_h new file mode 100644 index 000000000..f669446f5 --- /dev/null +++ b/package/kismet/patches/patch-dumpfile_tuntap_h @@ -0,0 +1,18 @@ +--- kismet-2013-03-R1b.orig/dumpfile_tuntap.h 2013-03-27 15:41:48.000000000 +0100 ++++ kismet-2013-03-R1b/dumpfile_tuntap.h 2014-01-02 20:53:21.000000000 +0100 +@@ -65,7 +65,15 @@ + #include "dumpfile.h" + + #ifdef SYS_LINUX ++#if defined(__GLIBC__) + #include ++#else ++#define IFF_TUN 0x0001 ++#define IFF_TAP 0x0002 ++#define IFF_NO_PI 0x1000 ++#define TUNSETNOCSUM _IOW('T', 200, int) ++#define TUNSETIFF _IOW('T', 202, int) ++#endif + + // Linux IEEE80211 link typ to set + #define LNX_LINKTYPE_80211 801 diff --git a/package/lame/Makefile b/package/lame/Makefile index 261ffe840..55d485de2 100644 --- a/package/lame/Makefile +++ b/package/lame/Makefile @@ -30,6 +30,7 @@ $(eval $(call PKG_template,LAME,lame,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS $(eval $(call PKG_template,LIBMP3LAME,libmp3lame,$(PKG_VERSION)-${PKG_RELEASE},,${PKGSD_LIBMP3LAME},${PKGSC_LIBMP3LAME},${PKG_OPTS})) TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS)) +TARGET_LDFLAGS+= -ltinfo lame-install: $(INSTALL_DIR) $(IDIR_LAME)/usr/bin diff --git a/package/libshout/Makefile b/package/libshout/Makefile index 13ef36c4c..26520e13a 100644 --- a/package/libshout/Makefile +++ b/package/libshout/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libshout -PKG_VERSION:= 2.2.2 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 4f75fc9901c724b712c371c9a1e782d3 +PKG_VERSION:= 2.3.1 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 11765b2592e7ea623ccd93d3f8df172c PKG_DESCR:= Library which can be used to write a source client for streaming PKG_SECTION:= libs PKG_DEPENDS:= libvorbis libogg @@ -19,8 +19,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,LIBSHOUT,libshout,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) -CONFIGURE_ARGS+= --with-speex=no \ - --with-theora=no +CONFIGURE_ARGS+= --disable-speex \ + --disable-theora libshout-install: ${INSTALL_DIR} ${IDIR_LIBSHOUT}/usr/lib diff --git a/package/libshout/patches/patch-ltmain_sh b/package/libshout/patches/patch-ltmain_sh deleted file mode 100644 index 16c4c7888..000000000 --- a/package/libshout/patches/patch-ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- libshout-2.2.2.orig/ltmain.sh 2006-01-10 16:23:50.000000000 +0100 -+++ libshout-2.2.2/ltmain.sh 2011-01-15 23:03:59.000000000 +0100 -@@ -1623,7 +1623,7 @@ EOF - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -- -t[45]*|-txscale*|@*) -+ -t[45]*|-txscale*|@*|-fstack-protector*|-flto) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. diff --git a/package/m4/Makefile b/package/m4/Makefile index f7fe684b2..f34780964 100644 --- a/package/m4/Makefile +++ b/package/m4/Makefile @@ -6,7 +6,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= m4 PKG_VERSION:= 1.4.17 PKG_RELEASE:= 1 -PKG_MD5SUM:= a5dfb4f2b7370e9d34293d23fd09b280 +PKG_MD5SUM:= a5e9954b1dae036762f7b13673a2cf76 PKG_DESCR:= macro processor PKG_SECTION:= lang PKG_BUILDDEP:= m4-host diff --git a/package/m4/patches/patch-lib_stdio_in_h b/package/m4/patches/patch-lib_stdio_in_h deleted file mode 100644 index 1d6eefc41..000000000 --- a/package/m4/patches/patch-lib_stdio_in_h +++ /dev/null @@ -1,13 +0,0 @@ ---- m4-1.4.16.orig/lib/stdio.in.h 2011-03-01 17:39:29.000000000 +0100 -+++ m4-1.4.16/lib/stdio.in.h 2013-10-29 10:45:30.000000000 +0100 -@@ -161,8 +161,10 @@ _GL_WARN_ON_USE (fflush, "fflush is not - /* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning. Assume it is - always declared, since it is required by C89. */ -+#if HAVE_RAW_DECL_GETS - #undef gets - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -+#endif - - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ diff --git a/package/nano/Makefile b/package/nano/Makefile index 42bb647df..b351ab73e 100644 --- a/package/nano/Makefile +++ b/package/nano/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= nano -PKG_VERSION:= 2.2.4 +PKG_VERSION:= 2.2.6 PKG_RELEASE:= 1 -PKG_MD5SUM:= 6304308afb1f7ef4a5e93eb99206632a +PKG_MD5SUM:= 03233ae480689a008eb98feb1b599807 PKG_DESCR:= An enhanced clone of the Pico editor PKG_SECTION:= editor PKG_DEPENDS:= libncurses @@ -14,30 +14,24 @@ PKG_BUILDDEP:= ncurses PKG_URL:= http://www.nano-editor.org/ PKG_SITES:= http://www.nano-editor.org/dist/v2.2/ -PKG_FLAVOURS_NANO:= TINY -PKGFD_TINY:= tiny nano - include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,NANO,nano,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIGURE_ENV+= ac_cv_header_regex_h=no CONFIGURE_ARGS+= --enable-nanorc \ - --disable-glibtest \ + --enable-tiny \ --disable-utf8 \ + --disable-glibtest \ --disable-color \ - --without-slang -ifeq (${ADK_PACKAGE_NANO_TINY},y) -CONFIGURE_ARGS+= --enable-tiny -else -CONFIGURE_ARGS+= --disable-browser \ + --without-slang \ + --disable-browser \ --disable-help \ --disable-mouse \ - --disable-nls \ --disable-speller \ --disable-operatingdir \ --enable-multibuffer -endif +TARGET_LDFLAGS+= -ltinfo nano-install: ${INSTALL_DIR} ${IDIR_NANO}/usr/bin diff --git a/package/ntpclient/patches/patch-ntpclient_c b/package/ntpclient/patches/patch-ntpclient_c new file mode 100644 index 000000000..ed3b6c1d2 --- /dev/null +++ b/package/ntpclient/patches/patch-ntpclient_c @@ -0,0 +1,11 @@ +--- ntpclient-2010.orig/ntpclient.c 2010-12-31 18:28:36.000000000 +0100 ++++ ntpclient-2010/ntpclient.c 2014-01-03 12:20:27.000000000 +0100 +@@ -441,7 +441,7 @@ static void stuff_net_addr(struct in_add + struct hostent *ntpserver; + ntpserver=gethostbyname(hostname); + if (ntpserver == NULL) { +- herror(hostname); ++ perror(hostname); + exit(1); + } + if (ntpserver->h_length != 4) { diff --git a/package/open-iscsi/patches/patch-usr_idbm_c b/package/open-iscsi/patches/patch-usr_idbm_c new file mode 100644 index 000000000..38838c9a1 --- /dev/null +++ b/package/open-iscsi/patches/patch-usr_idbm_c @@ -0,0 +1,10 @@ +--- open-iscsi-2.0-871.orig/usr/idbm.c 2009-07-11 05:55:58.000000000 +0200 ++++ open-iscsi-2.0-871/usr/idbm.c 2014-01-03 12:44:20.000000000 +0100 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + #include "idbm.h" + #include "idbm_fields.h" diff --git a/package/open-iscsi/patches/patch-usr_mgmt_ipc_c b/package/open-iscsi/patches/patch-usr_mgmt_ipc_c index bc29bd21b..d1d936e0f 100644 --- a/package/open-iscsi/patches/patch-usr_mgmt_ipc_c +++ b/package/open-iscsi/patches/patch-usr_mgmt_ipc_c @@ -1,6 +1,6 @@ --- open-iscsi-2.0-871.orig/usr/mgmt_ipc.c 2009-07-11 05:55:58.000000000 +0200 -+++ open-iscsi-2.0-871/usr/mgmt_ipc.c 2010-11-22 22:47:25.000000000 +0100 -@@ -341,31 +341,7 @@ mgmt_ipc_notify_del_portal(queue_task_t ++++ open-iscsi-2.0-871/usr/mgmt_ipc.c 2014-01-03 12:35:32.000000000 +0100 +@@ -341,31 +341,7 @@ mgmt_ipc_notify_del_portal(queue_task_t static int mgmt_peeruser(int sock, char *user) { diff --git a/package/osiris/patches/patch-src_libosiris_Makefile_in b/package/osiris/patches/patch-src_libosiris_Makefile_in index a7d09c693..458fc8bbd 100644 --- a/package/osiris/patches/patch-src_libosiris_Makefile_in +++ b/package/osiris/patches/patch-src_libosiris_Makefile_in @@ -1,6 +1,6 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- osiris-4.2.3.orig/src/libosiris/Makefile.in 2006-07-28 01:57:51.000000000 +0200 -+++ osiris-4.2.3/src/libosiris/Makefile.in 2009-05-10 20:51:38.000000000 +0200 ++++ osiris-4.2.3/src/libosiris/Makefile.in 2014-01-03 17:24:45.000000000 +0100 @@ -105,7 +105,7 @@ libosiris_a_SOURCES = list.c message.c s filter_uid.c filter_gid.c filter_user.c \ filter_group.c filter_header.c filter_file.c \ @@ -10,7 +10,7 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $ string_list.h ssl_utilities.h utilities.h \ regex.h regex.c debug.h debug.c strcasestr.c \ error.h strptime.h -@@ -128,11 +128,10 @@ am_libosiris_a_OBJECTS = list.$(OBJEXT) +@@ -128,11 +128,10 @@ am_libosiris_a_OBJECTS = list.$(OBJEXT) filter_python.$(OBJEXT) filter_script.$(OBJEXT) \ filter_gzip.$(OBJEXT) filter_zip.$(OBJEXT) filter_tar.$(OBJEXT) \ filter_pgp.$(OBJEXT) filter_rpm.$(OBJEXT) filter_uid.$(OBJEXT) \ diff --git a/package/osiris/patches/patch-src_libosiris_osi_common_h b/package/osiris/patches/patch-src_libosiris_osi_common_h new file mode 100644 index 000000000..b30462a3c --- /dev/null +++ b/package/osiris/patches/patch-src_libosiris_osi_common_h @@ -0,0 +1,10 @@ +--- osiris-4.2.3.orig/src/libosiris/osi_common.h 2006-07-28 01:57:51.000000000 +0200 ++++ osiris-4.2.3/src/libosiris/osi_common.h 2014-01-03 17:33:53.000000000 +0100 +@@ -31,6 +31,7 @@ + #ifndef OSI_COMMON_H + #define OSI_COMMON_H + ++#include + #include "config.h" + + /* for atomic_t */ diff --git a/package/procps/Makefile b/package/procps/Makefile index ac309c63d..dd5f1139c 100644 --- a/package/procps/Makefile +++ b/package/procps/Makefile @@ -19,6 +19,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,PROCPS,procps,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) CONFIG_STYLE:= manual +TARGET_LDFLAGS+= -ltinfo procps-install: ${INSTALL_DIR} ${IDIR_PROCPS}/{bin,sbin,usr/bin} diff --git a/package/proftpd/Makefile b/package/proftpd/Makefile index 9796c0a09..f44c94d17 100644 --- a/package/proftpd/Makefile +++ b/package/proftpd/Makefile @@ -4,15 +4,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:= proftpd -PKG_VERSION:= 1.3.3 +PKG_VERSION:= 1.3.4d PKG_RELEASE:= 1 -PKG_MD5SUM:= 97ad29f31f4fe633a9f8d021bab2df20 +PKG_MD5SUM:= 13c6fd7ce320886adc371c81a3e23f07 PKG_DESCR:= A very configurable FTP server PKG_SECTION:= www PKG_URL:= http://www.proftpd.org/ PKG_SITES:= ftp://ftp.proftpd.org/distrib/source/ PKG_NOPARALLEL:= 1 +PKG_LIBC_DEPENDS:= eglibc glibc + PKG_FLAVOURS_PROFTPD:= WITH_FTPUSERS PKGFD_WITH_FTPUSERS:= install /etc/ftpusers along with proftpd @@ -23,6 +25,7 @@ $(eval $(call PKG_template,PROFTPD,proftpd,$(PKG_VERSION)-${PKG_RELEASE},${PKG_D CONFIGURE_ARGS+= --disable-cap CONFIGURE_ENV+= ac_cv_func_setpgrp_void=yes \ ac_cv_func_setgrent_void=yes +TARGET_LDFLAGS+= -ltinfo proftpd-install: $(INSTALL_DIR) $(IDIR_PROFTPD)/etc diff --git a/package/rdesktop/Makefile b/package/rdesktop/Makefile index 784c19ee4..ebf30cf03 100644 --- a/package/rdesktop/Makefile +++ b/package/rdesktop/Makefile @@ -9,7 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= f5382c5c85b0d2cc88b9b1aa9bbf1356 PKG_DESCR:= client for Windows Terminal Services PKG_SECTION:= net -PKG_BUILDDEP:= libiconv-tiny openssl +PKG_DEPENDS:= libsamplerate libopenssl alsa-lib libao +PKG_BUILDDEP:= libiconv-tiny openssl libsamplerate alsa-lib libao PKG_URL:= http://www.rdesktop.org/ PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=rdesktop/} diff --git a/package/util-linux/Makefile b/package/util-linux/Makefile index 591158f24..b449a985e 100644 --- a/package/util-linux/Makefile +++ b/package/util-linux/Makefile @@ -69,7 +69,7 @@ CONFIGURE_ARGS+= --disable-use-tty-group \ --with-ncurses=$(STAGING_DIR)/usr/include \ --libdir=/usr/lib FAKE_FLAGS+= INSTALLSUID="install -m 4755" -TARGET_CFLAGS+= -DSWAPON_HAS_TWO_ARGS -DHAVE_LLSEEK +TARGET_CFLAGS+= -DSWAPON_HAS_TWO_ARGS -DHAVE_LLSEEK -ltinfo util-linux-install: diff --git a/package/xterm/Makefile b/package/xterm/Makefile index 5e26c53b8..10bfaf21a 100644 --- a/package/xterm/Makefile +++ b/package/xterm/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= xterm PKG_VERSION:= 297 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 45610ae6fe90cf086fcd75b9cb97bbaf PKG_DESCR:= Terminal Emulator for X Windows PKG_SECTION:= x11/apps @@ -20,6 +20,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XTERM,xterm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_LDFLAGS+= -ltinfo CONFIGURE_ARGS+= --with-app-defaults=/usr/lib/X11/app-defaults \ --disable-pty-handshake -- cgit v1.2.3 From 01f75429d58f4a0b2b68da966b24d0b011fe3c8d Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 3 Jan 2014 18:35:24 +0100 Subject: disable proftpd for now, it is broken --- package/mpg123/Makefile | 1 + package/proftpd/Makefile | 1 + 2 files changed, 2 insertions(+) (limited to 'package') diff --git a/package/mpg123/Makefile b/package/mpg123/Makefile index 49d23b617..350a7a097 100644 --- a/package/mpg123/Makefile +++ b/package/mpg123/Makefile @@ -20,6 +20,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,MPG123,mpg123,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_CPPFLAGS+= -D_GNU_SOURCE -D_POSIX_SOURCE CONFIGURE_ARGS+= --disable-shared \ --with-default-audio=alsa diff --git a/package/proftpd/Makefile b/package/proftpd/Makefile index f44c94d17..cb0662354 100644 --- a/package/proftpd/Makefile +++ b/package/proftpd/Makefile @@ -14,6 +14,7 @@ PKG_SITES:= ftp://ftp.proftpd.org/distrib/source/ PKG_NOPARALLEL:= 1 PKG_LIBC_DEPENDS:= eglibc glibc +PKG_CFLINE_PROFTPD:= depends on ADK_BROKEN PKG_FLAVOURS_PROFTPD:= WITH_FTPUSERS PKGFD_WITH_FTPUSERS:= install /etc/ftpusers along with proftpd -- cgit v1.2.3 From aa44e3ad5bc7f34a66d2b9abf1f38f32716e25c5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 18:33:47 +0100 Subject: fix musl compile --- package/radvd/Makefile | 7 ++++--- package/radvd/patches/patch-configure_ac | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 package/radvd/patches/patch-configure_ac (limited to 'package') diff --git a/package/radvd/Makefile b/package/radvd/Makefile index 4cb7d2c0a..1dd5b6ccf 100644 --- a/package/radvd/Makefile +++ b/package/radvd/Makefile @@ -4,13 +4,13 @@ include ${TOPDIR}/rules.mk PKG_NAME:= radvd -PKG_VERSION:= 1.9.1 +PKG_VERSION:= 1.9.7 PKG_RELEASE:= 1 -PKG_MD5SUM:= e807ad7e9a76d46b6133df391385cd31 +PKG_MD5SUM:= 85141c7dc7d35e5499e16052742f1040 PKG_DESCR:= Routing Advertisement Daemon for IPv6 PKG_SECTION:= ipv6 PKG_DEPENDS:= kmod-ipv6 libdaemon -PKG_BUILDDEP:= libdaemon +PKG_BUILDDEP:= autotool libdaemon PKG_URL:= http://www.litech.org/radvd/ PKG_SITES:= http://v6web.litech.org/radvd/dist/ @@ -20,6 +20,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,RADVD,radvd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +AUTOTOOL_STYLE:= autoreconf CONFIGURE_ARGS+= --with-configfile=/etc/radvd.conf \ --with-logfile=/var/log/radvd.log \ --with-pidfile=/var/run/radvd.pid diff --git a/package/radvd/patches/patch-configure_ac b/package/radvd/patches/patch-configure_ac new file mode 100644 index 000000000..a20e387ac --- /dev/null +++ b/package/radvd/patches/patch-configure_ac @@ -0,0 +1,10 @@ +--- radvd-1.9.7.orig/configure.ac 2013-11-17 16:41:26.000000000 +0100 ++++ radvd-1.9.7/configure.ac 2014-01-04 18:30:07.000000000 +0100 +@@ -151,7 +151,6 @@ AC_CHECK_HEADERS( \ + net/if_types.h \ + sys/param.h \ + sys/sockio.h \ +- sys/sysctl.h \ + sys/time.h \ + time.h \ + ) -- cgit v1.2.3 From ce502dbd77b6cb7df4493477d8e3eb39e793c707 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 18:52:50 +0100 Subject: disable for musl --- package/v4l-utils/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'package') diff --git a/package/v4l-utils/Makefile b/package/v4l-utils/Makefile index 2aa16159f..70bcc28d6 100644 --- a/package/v4l-utils/Makefile +++ b/package/v4l-utils/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= v4l-utils -PKG_VERSION:= 0.9.3 -PKG_RELEASE:= 2 -PKG_MD5SUM:= f4d24bb9f0307345d5a8fc4febcb993d +PKG_VERSION:= 1.0.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 2127f2d06be9162b0d346f7037a9e852 PKG_DESCR:= Video4Linux2 utilities PKG_SECTION:= multimedia PKG_BUILDDEP:= jpeg @@ -16,7 +16,7 @@ PKG_OPTS:= dev DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 -PKG_LIBC_DEPENDS:= eglibc glibc musl +PKG_LIBC_DEPENDS:= eglibc glibc PKG_SUBPKGS:= V4L_UTILS LIBV4L PKGSC_LIBV4L:= libs PKGSD_LIBV4L:= Video4Linux2 libraries -- cgit v1.2.3 From 8aea021dd3d270858b9eab82a4599803ed0e4d75 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 19:16:32 +0100 Subject: fix linking after ncurses change --- package/irssi/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/irssi/Makefile b/package/irssi/Makefile index 6323eedae..554173ad1 100644 --- a/package/irssi/Makefile +++ b/package/irssi/Makefile @@ -5,7 +5,7 @@ include ${TOPDIR}/rules.mk PKG_NAME:= irssi PKG_VERSION:= 0.8.15 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 870db8e319f640c2bf446c30d0c24ef6 PKG_DESCR:= IRC text client PKG_SECTION:= chat @@ -24,6 +24,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,IRSSI,irssi,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_LDFLAGS+= -ltinfo CONFIGURE_ARGS+= --with-perl=no \ --with-gnu-ld \ --with-textui \ -- cgit v1.2.3 From c0949bd08b50c985226dee3d1b3f63d1d067293e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 19:40:19 +0100 Subject: fix compile --- package/htop/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'package') diff --git a/package/htop/Makefile b/package/htop/Makefile index b0bfaa905..5ecd5a59a 100644 --- a/package/htop/Makefile +++ b/package/htop/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= htop PKG_VERSION:= 1.0.2 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= 0d01cca8df3349c74569cefebbd9919e PKG_DESCR:= graphical process manager PKG_SECTION:= utils @@ -18,6 +18,7 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,HTOP,htop,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_LDFLAGS+= -ltinfo CONFIGURE_ENV+= ac_cv_file__proc_stat=yes \ ac_cv_file__proc_meminfo=yes CONFIGURE_ARGS+= --disable-unicode -- cgit v1.2.3 From a59586559efd7c3d253506217f848cbb08aa7399 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 22:18:23 +0100 Subject: fix monit musl compile --- package/monit/Makefile | 6 ++- package/monit/patches/patch-configure | 88 ----------------------------------- 2 files changed, 4 insertions(+), 90 deletions(-) delete mode 100644 package/monit/patches/patch-configure (limited to 'package') diff --git a/package/monit/Makefile b/package/monit/Makefile index 3ba33eef1..93681fbd5 100644 --- a/package/monit/Makefile +++ b/package/monit/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= monit -PKG_VERSION:= 5.2.1 +PKG_VERSION:= 5.6 PKG_RELEASE:= 1 -PKG_MD5SUM:= 19ee6247b7528947d151720767bcf9d3 +PKG_MD5SUM:= 19dfc1ce8512e832134d06eedd96ba50 PKG_DESCR:= An utility for system services monitoring PKG_SECTION:= admin PKG_DEPENDS:= libpthread libopenssl @@ -18,6 +18,8 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,MONIT,monit,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +CONFIGURE_ENV+= libmonit_cv_setjmp_available=yes \ + libmonit_cv_vsnprintf_c99_conformant=yes CONFIGURE_ARGS+= --with-ssl --with-ssl-dir="${STAGING_TARGET_DIR}/usr" monit-install: diff --git a/package/monit/patches/patch-configure b/package/monit/patches/patch-configure deleted file mode 100644 index 1617c86ac..000000000 --- a/package/monit/patches/patch-configure +++ /dev/null @@ -1,88 +0,0 @@ ---- monit-5.2.1.orig/configure 2010-09-24 21:46:55.000000000 +0200 -+++ monit-5.2.1/configure 2010-10-08 23:36:24.000000000 +0200 -@@ -10961,82 +10961,14 @@ fi - # Architecture/OS detection - # ------------------------------------------------------------------------ - --# Backward compatibility until we get ride of arch settings --if test `uname` = "SunOS" --then -- ARCH="SOLARIS" -- CFLAGS="$CFLAGS -D _REENTRANT -D_POSIX_PTHREAD_SEMANTICS" -- test_kstat="true" -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_CPU_WAIT 1 --_ACEOF -- --elif test `uname` = "Linux" --then -- ARCH="LINUX" -- CFLAGS="$CFLAGS -D _REENTRANT" -- LDFLAGS="$LDFLAGS -rdynamic" -- if test `uname -r | awk -F '.' '{print$1$2}'` -ge "26" -- then -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_CPU_WAIT 1 --_ACEOF -- -- fi --elif test `uname` = "HP-UX" --then -- ARCH="HPUX" -- CFLAGS="$CFLAGS -D _REENTRANT" -- --cat >>confdefs.h <<\_ACEOF --#define HAVE_CPU_WAIT 1 --_ACEOF -- --elif test `uname` = "OpenBSD" --then -- ARCH="OPENBSD" -- CFLAGS="$CFLAGS -D _REENTRANT" -- test_kvm="true" --elif test `uname` = "FreeBSD" --then -- ARCH="FREEBSD" -- CFLAGS="$CFLAGS -D _REENTRANT" -- test_kvm="true" --elif test `uname` = "NetBSD" --then -- ARCH="NETBSD" -- CFLAGS="$CFLAGS -D _REENTRANT" -- test_kvm="true" --elif test `uname` = "Darwin" --then -- ARCH="DARWIN" -- CFLAGS="$CFLAGS -DREENTRANT -no-cpp-precomp -DNEED_SOCKLEN_T_DEFINED" -- test_kvm="true" -- LIBS="$LIBS -framework System -multiply_defined suppress" --elif test `uname` = "AIX" --then -- ARCH="AIX" -- CFLAGS="$CFLAGS -D _REENTRANT" -- LIBS="$LIBS -lodm" -- # AIX v. 5.2 -- LIBS="$LIBS -lcfg" -- # AIX v. 5.3 -- LIBS="$LIBS -lperfstat" -+ARCH="LINUX" -+CFLAGS="$CFLAGS -D _REENTRANT" -+LDFLAGS="$LDFLAGS -rdynamic" - - cat >>confdefs.h <<\_ACEOF - #define HAVE_CPU_WAIT 1 - _ACEOF - --else -- { $as_echo "$as_me:$LINENO: WARNING: Architecture not supported: \`uname\`." >&5 --$as_echo "$as_me: WARNING: Architecture not supported: \`uname\`." >&2;} -- CFLAGS="$CFLAGS -D _REENTRANT" -- ARCH="UNKNOWN" --fi -- -- - # ------------------------------------------------------------------------ - # Resource code - # ------------------------------------------------------------------------ -- cgit v1.2.3 From bb9efd268326393ca769c38e6385216569e70e52 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 22:21:30 +0100 Subject: update firefox and dependencies --- package/alsa-lib/patches/patch-libtool | 177 ++ package/alsa-lib/patches/patch-utils_alsa_pc_in | 12 + package/firefox/Makefile | 6 +- .../patch-ipc_chromium_src_base_file_util_h | 21 +- .../patch-ipc_chromium_src_base_file_util_posix_cc | 37 +- package/firefox/patches/patch-js_src_Makefile_in | 6 +- ...a_mtransport_third_party_nICEr_src_stun_addrs_c | 30 +- ...ia_mtransport_third_party_nICEr_src_stun_stun_h | 12 + ...trunk_webrtc_system_wrappers_source_cpu_info_cc | 12 +- ...em_wrappers_source_spreadsortlib_spreadsort_hpp | 8 +- ...thon_mozbuild_mozbuild_backend_recursivemake_py | 11 + .../patches/patch-tools_profiler_platform-linux_cc | 10 +- .../patch-tools_profiler_shared-libraries-linux_cc | 8 +- .../patches/patch-xpcom_io_nsLocalFileUnix_cpp | 6 +- .../patches/patch-xpcom_threads_nsThread_cpp | 6 +- package/libXft/patches/patch-src_xftglyphs_c | 11 +- package/libpng/Makefile | 6 +- package/libpng/patches/libpng-1.5.15-apng.patch | 1677 ------------------- package/libpng/patches/libpng-1.6.8-apng.patch | 1701 ++++++++++++++++++++ package/nspr/Makefile | 8 +- .../patch-mozilla_nsprpub_config_Makefile_in | 11 - .../nspr/patches/patch-mozilla_nsprpub_configure | 11 - .../patch-mozilla_nsprpub_pr_src_misc_prnetdb_c | 16 - 23 files changed, 1992 insertions(+), 1811 deletions(-) create mode 100644 package/alsa-lib/patches/patch-libtool create mode 100644 package/alsa-lib/patches/patch-utils_alsa_pc_in create mode 100644 package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_stun_h create mode 100644 package/firefox/patches/patch-python_mozbuild_mozbuild_backend_recursivemake_py delete mode 100644 package/libpng/patches/libpng-1.5.15-apng.patch create mode 100644 package/libpng/patches/libpng-1.6.8-apng.patch delete mode 100644 package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in delete mode 100644 package/nspr/patches/patch-mozilla_nsprpub_configure delete mode 100644 package/nspr/patches/patch-mozilla_nsprpub_pr_src_misc_prnetdb_c (limited to 'package') diff --git a/package/alsa-lib/patches/patch-libtool b/package/alsa-lib/patches/patch-libtool new file mode 100644 index 000000000..7879d575a --- /dev/null +++ b/package/alsa-lib/patches/patch-libtool @@ -0,0 +1,177 @@ +--- alsa-lib-1.0.27.2.orig/libtool 2013-07-08 14:32:53.000000000 +0200 ++++ alsa-lib-1.0.27.2/libtool 2013-12-30 17:42:30.000000000 +0100 +@@ -1,8 +1,8 @@ +-#! /bin/sh ++#! /bin/bash + + # libtool - Provide generalized library-building support services. + # Generated automatically by config.status (alsa-lib) 1.0.27.2 +-# Libtool was configured on host alsa.alsa-project.org: ++# Libtool was configured on host helium: + # NOTE: Changes made to this file will be lost: look at ltmain.sh. + # + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +@@ -40,7 +40,7 @@ available_tags="" + # ### BEGIN LIBTOOL CONFIG + + # Whether or not to build static libraries. +-build_old_libs=no ++build_old_libs=yes + + # Which release of libtool.m4 was used? + macro_version=2.4.2 +@@ -56,7 +56,7 @@ pic_mode=default + fast_install=yes + + # Shell to use when invoking shell scripts. +-SHELL="/bin/sh" ++SHELL="/bin/bash" + + # An echo program that protects backslashes. + ECHO="printf %s\\n" +@@ -65,38 +65,38 @@ ECHO="printf %s\\n" + PATH_SEPARATOR=":" + + # The host system. +-host_alias= +-host=x86_64-unknown-linux-gnu ++host_alias=i686-openadk-linux ++host=i686-openadk-linux-gnu + host_os=linux-gnu + + # The build system. +-build_alias= +-build=x86_64-unknown-linux-gnu ++build_alias=x86_64-linux-gnu ++build=x86_64-pc-linux-gnu + build_os=linux-gnu + + # A sed program that does not truncate output. +-SED="/usr/bin/sed" ++SED="/home/wbx/ibmx40/scripts/sed" + + # Sed that helps us avoid accidentally triggering echo(1) options like -n. + Xsed="$SED -e 1s/^X//" + + # A grep program that handles long lines. +-GREP="/usr/bin/grep" ++GREP="/bin/grep" + + # An ERE matcher. +-EGREP="/usr/bin/grep -E" ++EGREP="/bin/grep -E" + + # A literal string matcher. +-FGREP="/usr/bin/grep -F" ++FGREP="/bin/grep -F" + + # A BSD- or MS-compatible name lister. +-NM="/usr/bin/nm -B" ++NM="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-nm" + + # Whether we need soft or hard links. + LN_S="ln -s" + + # What is the maximum length of a command? +-max_cmd_len=1572864 ++max_cmd_len=3458764513820540925 + + # Object file suffix (normally "o"). + objext=o +@@ -120,7 +120,7 @@ to_host_file_cmd=func_convert_file_noop + to_tool_file_cmd=func_convert_file_noop + + # An object symbol dumper. +-OBJDUMP="objdump" ++OBJDUMP="i686-openadk-linux-objdump" + + # Method to check whether dependent libraries are shared objects. + deplibs_check_method="pass_all" +@@ -141,7 +141,7 @@ DLLTOOL="false" + sharedlib_from_linklib_cmd="printf %s\\n" + + # The archiver. +-AR="ar" ++AR="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-ar" + + # Flags to create an archive. + AR_FLAGS="cru" +@@ -150,10 +150,10 @@ AR_FLAGS="cru" + archiver_list_spec="@" + + # A symbol stripping program. +-STRIP="strip" ++STRIP="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-strip" + + # Commands used to install an old-style archive. +-RANLIB="ranlib" ++RANLIB="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-ranlib" + old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib" + old_postuninstall_cmds="" + +@@ -161,10 +161,10 @@ old_postuninstall_cmds="" + lock_old_archive_extraction=no + + # A C compiler. +-LTCC="gcc" ++LTCC="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-gcc" + + # LTCC compiler flags. +-LTCFLAGS="-O2 -fomit-frame-pointer -Wall -pipe -D_GNU_SOURCE" ++LTCFLAGS="-march=pentium-m -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3 -D_GNU_SOURCE" + + # Take the output of nm and produce a listing of raw symbols and C names. + global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'" +@@ -272,27 +272,27 @@ finish_eval="" + hardcode_into_libs=yes + + # Compile-time system search path for libraries. +-sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/4.7.2 /usr/lib64 /lib64 " ++sys_lib_search_path_spec="/home/wbx/ibmx40/host_i686_musl_musl/lib/gcc/i686-openadk-linux-musl/4.7.3 /home/wbx/ibmx40/host_i686_musl_musl/i686-openadk-linux-musl/lib /home/wbx/ibmx40/target_i686_musl_musl/lib /home/wbx/ibmx40/target_i686_musl_musl/usr/lib " + + # Run-time system search path for libraries. +-sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/mysql /usr/lib64/qt-3.3/lib " ++sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu " + + # Whether dlopen is supported. + dlopen_support=yes + + # Whether dlopen of programs is supported. +-dlopen_self=yes ++dlopen_self=unknown + + # Whether dlopen of statically linked programs is supported. +-dlopen_self_static=yes ++dlopen_self_static=unknown + + # Commands to strip libraries. +-old_striplib="strip --strip-debug" +-striplib="strip --strip-unneeded" ++old_striplib="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-strip --strip-debug" ++striplib="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-strip --strip-unneeded" + + + # The linker used to build libraries. +-LD="/usr/bin/ld -m elf_x86_64" ++LD="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-ld" + + # How to create reloadable object files. + reload_flag=" -r" +@@ -302,7 +302,7 @@ reload_cmds="\$LD\$reload_flag -o \$outp + old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib" + + # A language specific compiler. +-CC="gcc" ++CC="/home/wbx/ibmx40/host_i686_musl_musl/bin/i686-openadk-linux-musl-gcc" + + # Is the compiler the GNU compiler? + with_gcc=yes +@@ -317,7 +317,7 @@ pic_flag=" -fPIC -DPIC" + wl="-Wl," + + # Compiler flag to prevent dynamic linking. +-link_static_flag="" ++link_static_flag="-static" + + # Does compiler simultaneously support -c and -o options? + compiler_c_o="yes" diff --git a/package/alsa-lib/patches/patch-utils_alsa_pc_in b/package/alsa-lib/patches/patch-utils_alsa_pc_in new file mode 100644 index 000000000..d04f80248 --- /dev/null +++ b/package/alsa-lib/patches/patch-utils_alsa_pc_in @@ -0,0 +1,12 @@ +--- alsa-lib-1.0.27.2.orig/utils/alsa.pc.in 2013-07-08 14:31:36.000000000 +0200 ++++ alsa-lib-1.0.27.2/utils/alsa.pc.in 2014-01-01 17:07:29.000000000 +0100 +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ +-libdir=@libdir@ +-includedir=@includedir@ ++libdir=${prefix}/lib ++includedir=${prefix}/include + + Name: alsa + Description: Advanced Linux Sound Architecture (ALSA) - Library diff --git a/package/firefox/Makefile b/package/firefox/Makefile index 69df75db1..f1764e14f 100644 --- a/package/firefox/Makefile +++ b/package/firefox/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= firefox -PKG_VERSION:= 24.0 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 06a4c0fe8d3a979aea2fce8d0fdbf328 +PKG_VERSION:= 26.0 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 91ce51cc6474f1269484e5327643a59c PKG_DESCR:= graphical webbrowser PKG_SECTION:= x11/apps PKG_DEPENDS:= libpthread alsa-lib glib libgtk libpng libtiff libxcursor libffi diff --git a/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h index 137efacd8..5f7e30a10 100644 --- a/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h +++ b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_h @@ -1,23 +1,10 @@ ---- mozilla-release.orig/ipc/chromium/src/base/file_util.h 2013-09-11 01:15:04.000000000 +0200 -+++ mozilla-release/ipc/chromium/src/base/file_util.h 2013-10-23 16:28:38.000000000 +0200 -@@ -16,7 +16,11 @@ +--- mozilla-release.orig/ipc/chromium/src/base/file_util.h 2013-12-05 17:07:35.000000000 +0100 ++++ mozilla-release/ipc/chromium/src/base/file_util.h 2014-01-02 15:01:42.000000000 +0100 +@@ -16,7 +16,6 @@ #include #elif defined(OS_POSIX) #include -+#ifndef __GLIBC__ -+#define NO_FTS -+#else - #include -+#endif +-#include #include #endif -@@ -466,7 +470,7 @@ class FileEnumerator { - #if defined(OS_WIN) - WIN32_FIND_DATA find_data_; - HANDLE find_handle_; --#elif defined(ANDROID) -+#elif defined(NO_FTS) - void *fts_; - #elif defined(OS_POSIX) - FTS* fts_; diff --git a/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc index 6721e44f8..7680a29c4 100644 --- a/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc +++ b/package/firefox/patches/patch-ipc_chromium_src_base_file_util_posix_cc @@ -1,5 +1,5 @@ ---- mozilla-release.orig/ipc/chromium/src/base/file_util_posix.cc 2013-09-11 01:15:04.000000000 +0200 -+++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc 2013-10-23 16:28:38.000000000 +0200 +--- mozilla-release.orig/ipc/chromium/src/base/file_util_posix.cc 2013-12-05 17:07:35.000000000 +0100 ++++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc 2014-01-02 14:53:44.000000000 +0100 @@ -8,13 +8,16 @@ #include #include @@ -19,7 +19,7 @@ #include #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures #include -@@ -121,7 +124,7 @@ bool Delete(const FilePath& path, bool r +@@ -67,7 +70,7 @@ bool Delete(const FilePath& path, bool r if (!recursive) return (rmdir(path_str) == 0); @@ -28,7 +28,7 @@ // XXX Need ftsless impl for bionic return false; #else -@@ -194,7 +197,7 @@ bool CopyDirectory(const FilePath& from_ +@@ -140,7 +143,7 @@ bool CopyDirectory(const FilePath& from_ return false; } @@ -37,7 +37,7 @@ // XXX Need ftsless impl for bionic return false; #else -@@ -415,7 +418,7 @@ bool CreateNewTempDirectory(const FilePa +@@ -333,7 +336,7 @@ bool CreateNewTempDirectory(const FilePa return false; tmpdir = tmpdir.Append(kTempFileName); std::string tmpdir_string = tmpdir.value(); @@ -46,30 +46,3 @@ char* dtemp = NULL; #else // this should be OK since mkdtemp just replaces characters in place -@@ -613,7 +616,7 @@ FileEnumerator::FileEnumerator(const Fil - } - - FileEnumerator::~FileEnumerator() { --#ifndef ANDROID -+#ifndef NO_FTS - if (fts_) - fts_close(fts_); - #endif -@@ -625,7 +628,7 @@ void FileEnumerator::GetFindInfo(FindInf - if (!is_in_find_op_) - return; - --#ifndef ANDROID -+#ifndef NO_FTS - memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat)); - info->filename.assign(fts_ent_->fts_name); - #endif -@@ -636,7 +639,7 @@ void FileEnumerator::GetFindInfo(FindInf - // large directories with many files this can be quite deep. - // TODO(erikkay) - get rid of this recursive pattern - FilePath FileEnumerator::Next() { --#ifdef ANDROID -+#ifdef NO_FTS - return FilePath(); - #else - if (!is_in_find_op_) { diff --git a/package/firefox/patches/patch-js_src_Makefile_in b/package/firefox/patches/patch-js_src_Makefile_in index cb1b863f9..d4acee98c 100644 --- a/package/firefox/patches/patch-js_src_Makefile_in +++ b/package/firefox/patches/patch-js_src_Makefile_in @@ -1,6 +1,6 @@ ---- mozilla-release.orig/js/src/Makefile.in 2013-09-11 01:15:04.000000000 +0200 -+++ mozilla-release/js/src/Makefile.in 2013-10-14 12:36:25.000000000 +0200 -@@ -112,7 +112,7 @@ ifdef JS_HAS_CTYPES +--- mozilla-release.orig/js/src/Makefile.in 2013-12-05 17:07:35.000000000 +0100 ++++ mozilla-release/js/src/Makefile.in 2014-01-02 14:53:44.000000000 +0100 +@@ -103,7 +103,7 @@ ifdef JS_HAS_CTYPES VPATH += $(srcdir)/ctypes ifdef MOZ_NATIVE_FFI diff --git a/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c b/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c index be14ca662..bf6c335de 100644 --- a/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c +++ b/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_addrs_c @@ -1,11 +1,33 @@ ---- mozilla-release.orig/media/mtransport/third_party/nICEr/src/stun/addrs.c 2013-09-11 01:15:16.000000000 +0200 -+++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c 2013-12-10 13:18:17.000000000 +0100 -@@ -59,7 +59,7 @@ static char *RCSSTRING __UNUSED__="$Id: +--- mozilla-release.orig/media/mtransport/third_party/nICEr/src/stun/addrs.c 2013-12-05 17:07:48.000000000 +0100 ++++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c 2014-01-03 13:06:22.000000000 +0100 +@@ -53,7 +53,9 @@ static char *RCSSTRING __UNUSED__="$Id: + #undef __unused + #include + #endif ++#if defined(__GLIBC__) + #include ++#endif + #ifndef LINUX + #if !defined(__OpenBSD__) && !defined(__NetBSD__) + #include +@@ -61,14 +63,17 @@ static char *RCSSTRING __UNUSED__="$Id: #include #include #include -#else -+#elif __GLIBC__ ++#elif defined(__GLIBC__) + #include #include + #include + #include +-#ifndef ANDROID + #include +-#endif ++#else ++#include ++#include ++#include ++#include #endif #include + diff --git a/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_stun_h b/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_stun_h new file mode 100644 index 000000000..7877d65cc --- /dev/null +++ b/package/firefox/patches/patch-media_mtransport_third_party_nICEr_src_stun_stun_h @@ -0,0 +1,12 @@ +--- mozilla-release.orig/media/mtransport/third_party/nICEr/src/stun/stun.h 2013-12-05 17:07:48.000000000 +0100 ++++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/stun.h 2014-01-03 17:19:05.000000000 +0100 +@@ -39,7 +39,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE + #else + #include + #include ++#if defined(__GLIBC__) + #include ++#endif + #ifndef LINUX + #if !defined(__OpenBSD__) && !defined(__NetBSD__) + #include diff --git a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_cpu_info_cc b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_cpu_info_cc index 6083460c5..3ee2e0fdc 100644 --- a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_cpu_info_cc +++ b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_cpu_info_cc @@ -1,23 +1,23 @@ ---- mozilla-release.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc 2013-09-11 01:15:18.000000000 +0200 -+++ mozilla-release/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc 2013-10-15 12:21:59.000000000 +0200 -@@ -38,11 +38,6 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCo +--- mozilla-release.orig/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc 2013-12-05 17:07:50.000000000 +0100 ++++ mozilla-release/media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc 2014-01-02 14:58:37.000000000 +0100 +@@ -36,11 +36,6 @@ uint32_t CpuInfo::DetectNumberOfCores() WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, "Available number of cores:%d", number_of_cores_); -#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) -- number_of_cores_ = get_nprocs(); +- number_of_cores_ = static_cast(sysconf(_SC_NPROCESSORS_ONLN)); - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", number_of_cores_); - #elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) int name[] = { CTL_HW, -@@ -63,8 +58,6 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCo +@@ -61,8 +56,6 @@ uint32_t CpuInfo::DetectNumberOfCores() "Failed to get number of cores"); number_of_cores_ = 1; } -#elif defined(_SC_NPROCESSORS_ONLN) -- _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN); +- number_of_cores_ = sysconf(_SC_NPROCESSORS_ONLN); #else WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1, "No function to get number of cores"); diff --git a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_spreadsortlib_spreadsort_hpp b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_spreadsortlib_spreadsort_hpp index 7c262e5ff..ac1d23267 100644 --- a/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_spreadsortlib_spreadsort_hpp +++ b/package/firefox/patches/patch-media_webrtc_trunk_webrtc_system_wrappers_source_spreadsortlib_spreadsort_hpp @@ -1,8 +1,8 @@ ---- mozilla-release.orig/media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp 2013-09-11 01:15:18.000000000 +0200 -+++ mozilla-release/media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp 2013-10-15 16:05:38.000000000 +0200 +--- mozilla-release.orig/media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp 2013-12-05 17:07:50.000000000 +0100 ++++ mozilla-release/media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp 2014-01-02 14:53:44.000000000 +0100 @@ -21,6 +21,11 @@ Scott McMurray - #include "constants.hpp" - #include + #include + #include "webrtc/system_wrappers/source/spreadsortlib/constants.hpp" +#include +#if defined(__UCLIBC__) diff --git a/package/firefox/patches/patch-python_mozbuild_mozbuild_backend_recursivemake_py b/package/firefox/patches/patch-python_mozbuild_mozbuild_backend_recursivemake_py new file mode 100644 index 000000000..30f5edd57 --- /dev/null +++ b/package/firefox/patches/patch-python_mozbuild_mozbuild_backend_recursivemake_py @@ -0,0 +1,11 @@ +--- mozilla-release.orig/python/mozbuild/mozbuild/backend/recursivemake.py 2013-12-05 17:07:53.000000000 +0100 ++++ mozilla-release/python/mozbuild/mozbuild/backend/recursivemake.py 2014-01-04 17:58:26.000000000 +0100 +@@ -421,7 +421,7 @@ class RecursiveMakeBackend(CommonBackend + def _handle_idl_manager(self, manager): + build_files = self._purge_manifests['xpidl'] + +- for p in ('Makefile', 'backend.mk', '.deps/.mkdir.done', ++ for p in ('Makefile.in', 'Makefile', 'backend.mk', '.deps/.mkdir.done', + 'xpt/.mkdir.done'): + build_files.add(p) + diff --git a/package/firefox/patches/patch-tools_profiler_platform-linux_cc b/package/firefox/patches/patch-tools_profiler_platform-linux_cc index 7e9a44eba..a331e87fe 100644 --- a/package/firefox/patches/patch-tools_profiler_platform-linux_cc +++ b/package/firefox/patches/patch-tools_profiler_platform-linux_cc @@ -1,15 +1,15 @@ ---- mozilla-release.orig/tools/profiler/platform-linux.cc 2013-09-11 01:15:26.000000000 +0200 -+++ mozilla-release/tools/profiler/platform-linux.cc 2013-10-23 16:28:38.000000000 +0200 -@@ -53,7 +53,7 @@ - #include // open +--- mozilla-release.orig/tools/profiler/platform-linux.cc 2013-12-05 17:07:58.000000000 +0100 ++++ mozilla-release/tools/profiler/platform-linux.cc 2014-01-02 14:59:20.000000000 +0100 +@@ -58,7 +58,7 @@ #include // open #include // sysconf + #include -#ifdef __GLIBC__ +#if defined(__GLIBC__) && ! defined(__UCLIBC__) #include // backtrace, backtrace_symbols #endif // def __GLIBC__ #include // index -@@ -73,14 +73,12 @@ +@@ -84,14 +84,12 @@ #define SIGNAL_SAVE_PROFILE SIGUSR2 diff --git a/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc b/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc index 8ffa06228..40b8b594d 100644 --- a/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc +++ b/package/firefox/patches/patch-tools_profiler_shared-libraries-linux_cc @@ -1,11 +1,11 @@ ---- mozilla-release.orig/tools/profiler/shared-libraries-linux.cc 2013-09-11 01:15:26.000000000 +0200 -+++ mozilla-release/tools/profiler/shared-libraries-linux.cc 2013-10-23 16:28:38.000000000 +0200 +--- mozilla-release.orig/tools/profiler/shared-libraries-linux.cc 2013-12-05 17:07:58.000000000 +0100 ++++ mozilla-release/tools/profiler/shared-libraries-linux.cc 2014-01-02 15:00:00.000000000 +0100 @@ -14,7 +14,7 @@ #include "platform.h" #include "shared-libraries.h" --#ifndef __GLIBC__ +-#if !defined(__GLIBC__) && ANDROID_VERSION < 18 +#if 0 - /* a crapy version of getline, because it's not included in bionic */ + /* a crapy version of getline, because it's not included in old bionics */ static ssize_t getline(char **lineptr, size_t *n, FILE *stream) { diff --git a/package/firefox/patches/patch-xpcom_io_nsLocalFileUnix_cpp b/package/firefox/patches/patch-xpcom_io_nsLocalFileUnix_cpp index e9c2a28ad..868ad69d4 100644 --- a/package/firefox/patches/patch-xpcom_io_nsLocalFileUnix_cpp +++ b/package/firefox/patches/patch-xpcom_io_nsLocalFileUnix_cpp @@ -1,6 +1,6 @@ ---- mozilla-release.orig/xpcom/io/nsLocalFileUnix.cpp 2013-09-11 01:15:27.000000000 +0200 -+++ mozilla-release/xpcom/io/nsLocalFileUnix.cpp 2013-10-14 14:33:08.000000000 +0200 -@@ -1256,8 +1256,13 @@ nsLocalFile::GetDiskSpaceAvailable(int64 +--- mozilla-release.orig/xpcom/io/nsLocalFileUnix.cpp 2013-12-05 17:08:00.000000000 +0100 ++++ mozilla-release/xpcom/io/nsLocalFileUnix.cpp 2014-01-02 14:53:47.000000000 +0100 +@@ -1234,8 +1234,13 @@ nsLocalFile::GetDiskSpaceAvailable(int64 && dq.dqb_bhardlimit) { int64_t QuotaSpaceAvailable = 0; diff --git a/package/firefox/patches/patch-xpcom_threads_nsThread_cpp b/package/firefox/patches/patch-xpcom_threads_nsThread_cpp index eb7d1f21a..0f40d736a 100644 --- a/package/firefox/patches/patch-xpcom_threads_nsThread_cpp +++ b/package/firefox/patches/patch-xpcom_threads_nsThread_cpp @@ -1,6 +1,6 @@ ---- mozilla-release.orig/xpcom/threads/nsThread.cpp 2013-09-11 01:15:27.000000000 +0200 -+++ mozilla-release/xpcom/threads/nsThread.cpp 2013-10-14 15:49:25.000000000 +0200 -@@ -20,11 +20,13 @@ +--- mozilla-release.orig/xpcom/threads/nsThread.cpp 2013-12-05 17:08:00.000000000 +0100 ++++ mozilla-release/xpcom/threads/nsThread.cpp 2014-01-02 14:53:47.000000000 +0100 +@@ -23,11 +23,13 @@ _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) && \ !(_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700) diff --git a/package/libXft/patches/patch-src_xftglyphs_c b/package/libXft/patches/patch-src_xftglyphs_c index 54457857f..c8da32ca4 100644 --- a/package/libXft/patches/patch-src_xftglyphs_c +++ b/package/libXft/patches/patch-src_xftglyphs_c @@ -1,16 +1,17 @@ --- libXft-2.3.1.orig/src/xftglyphs.c 2012-06-02 18:36:35.000000000 +0200 -+++ libXft-2.3.1/src/xftglyphs.c 2013-12-07 12:17:23.000000000 +0100 ++++ libXft-2.3.1/src/xftglyphs.c 2014-01-02 14:41:02.000000000 +0100 @@ -21,10 +21,10 @@ */ #include "xftint.h" -#include -#include -+#include -+#include - +- -#include -+#include ++#include ++#include FT_OUTLINE_H ++#include FT_LCD_FILTER_H ++#include FT_SYNTHESIS_H /* * Validate the memory info for a font diff --git a/package/libpng/Makefile b/package/libpng/Makefile index 1d43a4998..ea4c3a1f8 100644 --- a/package/libpng/Makefile +++ b/package/libpng/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= libpng -PKG_VERSION:= 1.5.15 -PKG_RELEASE:= 2 -PKG_MD5SUM:= ea24254980fd820964a710e4d2a947c7 +PKG_VERSION:= 1.6.8 +PKG_RELEASE:= 1 +PKG_MD5SUM:= 29b7065906e2551508a0d7eacd19174e PKG_DESCR:= A library for reading/writing PNG images PKG_SECTION:= libs PKG_DEPENDS:= zlib diff --git a/package/libpng/patches/libpng-1.5.15-apng.patch b/package/libpng/patches/libpng-1.5.15-apng.patch deleted file mode 100644 index b169303e9..000000000 --- a/package/libpng/patches/libpng-1.5.15-apng.patch +++ /dev/null @@ -1,1677 +0,0 @@ -diff -Naru libpng-1.5.15.org/png.h libpng-1.5.15/png.h ---- libpng-1.5.15.org/png.h 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/png.h 2013-04-02 20:39:30.000000000 +0900 -@@ -448,6 +448,10 @@ - # include "pnglibconf.h" - #endif - -+#define PNG_APNG_SUPPORTED -+#define PNG_READ_APNG_SUPPORTED -+#define PNG_WRITE_APNG_SUPPORTED -+ - #ifndef PNG_VERSION_INFO_ONLY - # ifndef PNG_BUILDING_SYMBOL_TABLE - /* -@@ -555,6 +559,17 @@ - * See pngconf.h for base types that vary by machine/system - */ - -+#ifdef PNG_APNG_SUPPORTED -+/* dispose_op flags from inside fcTL */ -+#define PNG_DISPOSE_OP_NONE 0x00 -+#define PNG_DISPOSE_OP_BACKGROUND 0x01 -+#define PNG_DISPOSE_OP_PREVIOUS 0x02 -+ -+/* blend_op flags from inside fcTL */ -+#define PNG_BLEND_OP_SOURCE 0x00 -+#define PNG_BLEND_OP_OVER 0x01 -+#endif /* PNG_APNG_SUPPORTED */ -+ - /* This triggers a compiler error in png.c, if png.c and png.h - * do not agree upon the version number. - */ -@@ -838,6 +853,10 @@ - #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ - #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ - #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */ -+#ifdef PNG_APNG_SUPPORTED -+#define PNG_INFO_acTL 0x10000 -+#define PNG_INFO_fcTL 0x20000 -+#endif - - /* This is used for the transformation routines, as some of them - * change these values for the row. It also should enable using -@@ -883,6 +902,10 @@ - #ifdef PNG_PROGRESSIVE_READ_SUPPORTED - typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); - typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); -+#ifdef PNG_APNG_SUPPORTED -+typedef PNG_CALLBACK(void, *png_progressive_frame_ptr, (png_structp, -+ png_uint_32)); -+#endif - - /* The following callback receives png_uint_32 row_number, int pass for the - * png_bytep data of the row. When transforming an interlaced image the -@@ -2702,6 +2725,74 @@ - /******************************************************************************* - * END OF HARDWARE OPTIONS - ******************************************************************************/ -+#ifdef PNG_APNG_SUPPORTED -+PNG_EXPORT(237, png_uint_32, png_get_acTL, (png_structp png_ptr, -+ png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays)); -+ -+PNG_EXPORT(238, png_uint_32, png_set_acTL, (png_structp png_ptr, -+ png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays)); -+ -+PNG_EXPORT(239, png_uint_32, png_get_num_frames, (png_structp png_ptr, -+ png_infop info_ptr)); -+ -+PNG_EXPORT(240, png_uint_32, png_get_num_plays, (png_structp png_ptr, -+ png_infop info_ptr)); -+ -+PNG_EXPORT(241, png_uint_32, png_get_next_frame_fcTL, -+ (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, -+ png_uint_32 *height, png_uint_32 *x_offset, png_uint_32 *y_offset, -+ png_uint_16 *delay_num, png_uint_16 *delay_den, png_byte *dispose_op, -+ png_byte *blend_op)); -+ -+PNG_EXPORT(242, png_uint_32, png_set_next_frame_fcTL, -+ (png_structp png_ptr, png_infop info_ptr, png_uint_32 width, -+ png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, -+ png_byte blend_op)); -+ -+PNG_EXPORT(243, png_uint_32, png_get_next_frame_width, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(244, png_uint_32, png_get_next_frame_height, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(245, png_uint_32, png_get_next_frame_x_offset, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(246, png_uint_32, png_get_next_frame_y_offset, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(247, png_uint_16, png_get_next_frame_delay_num, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(248, png_uint_16, png_get_next_frame_delay_den, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(249, png_byte, png_get_next_frame_dispose_op, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(250, png_byte, png_get_next_frame_blend_op, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(251, png_byte, png_get_first_frame_is_hidden, -+ (png_structp png_ptr, png_infop info_ptr)); -+PNG_EXPORT(252, png_uint_32, png_set_first_frame_is_hidden, -+ (png_structp png_ptr, png_infop info_ptr, png_byte is_hidden)); -+ -+#ifdef PNG_READ_APNG_SUPPORTED -+PNG_EXPORT(253, void, png_read_frame_head, (png_structp png_ptr, -+ png_infop info_ptr)); -+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -+PNG_EXPORT(254, void, png_set_progressive_frame_fn, (png_structp png_ptr, -+ png_progressive_frame_ptr frame_info_fn, -+ png_progressive_frame_ptr frame_end_fn)); -+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -+#endif /* PNG_READ_APNG_SUPPORTED */ -+ -+#ifdef PNG_WRITE_APNG_SUPPORTED -+PNG_EXPORT(255, void, png_write_frame_head, (png_structp png_ptr, -+ png_infop info_ptr, png_bytepp row_pointers, -+ png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, -+ png_byte blend_op)); -+ -+PNG_EXPORT(256, void, png_write_frame_tail, (png_structp png_ptr, -+ png_infop info_ptr)); -+#endif /* PNG_WRITE_APNG_SUPPORTED */ -+#endif /* PNG_APNG_SUPPORTED */ - - /* Maintainer: Put new public prototypes here ^, in libpng.3, and project - * defs -@@ -2712,7 +2803,11 @@ - * scripts/symbols.def as well. - */ - #ifdef PNG_EXPORT_LAST_ORDINAL -+#ifdef PNG_APNG_SUPPORTED -+ PNG_EXPORT_LAST_ORDINAL(256); -+#else - PNG_EXPORT_LAST_ORDINAL(236); -+#endif /* PNG_APNG_SUPPORTED */ - #endif - - #ifdef __cplusplus -diff -Naru libpng-1.5.15.org/pngget.c libpng-1.5.15/pngget.c ---- libpng-1.5.15.org/pngget.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngget.c 2013-04-02 20:39:30.000000000 +0900 -@@ -1140,4 +1140,166 @@ - # endif - #endif - -+#ifdef PNG_APNG_SUPPORTED -+png_uint_32 PNGAPI -+png_get_acTL(png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 *num_frames, png_uint_32 *num_plays) -+{ -+ png_debug1(1, "in %s retrieval function", "acTL"); -+ -+ if (png_ptr != NULL && info_ptr != NULL && -+ (info_ptr->valid & PNG_INFO_acTL) && -+ num_frames != NULL && num_plays != NULL) -+ { -+ *num_frames = info_ptr->num_frames; -+ *num_plays = info_ptr->num_plays; -+ return (1); -+ } -+ -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_num_frames(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_num_frames()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->num_frames); -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_num_plays(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_num_plays()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->num_plays); -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 *width, png_uint_32 *height, -+ png_uint_32 *x_offset, png_uint_32 *y_offset, -+ png_uint_16 *delay_num, png_uint_16 *delay_den, -+ png_byte *dispose_op, png_byte *blend_op) -+{ -+ png_debug1(1, "in %s retrieval function", "fcTL"); -+ -+ if (png_ptr != NULL && info_ptr != NULL && -+ (info_ptr->valid & PNG_INFO_fcTL) && -+ width != NULL && height != NULL && -+ x_offset != NULL && y_offset != NULL && -+ delay_num != NULL && delay_den != NULL && -+ dispose_op != NULL && blend_op != NULL) -+ { -+ *width = info_ptr->next_frame_width; -+ *height = info_ptr->next_frame_height; -+ *x_offset = info_ptr->next_frame_x_offset; -+ *y_offset = info_ptr->next_frame_y_offset; -+ *delay_num = info_ptr->next_frame_delay_num; -+ *delay_den = info_ptr->next_frame_delay_den; -+ *dispose_op = info_ptr->next_frame_dispose_op; -+ *blend_op = info_ptr->next_frame_blend_op; -+ return (1); -+ } -+ -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_next_frame_width(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_width()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_width); -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_next_frame_height(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_height()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_height); -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_next_frame_x_offset(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_x_offset()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_x_offset); -+ return (0); -+} -+ -+png_uint_32 PNGAPI -+png_get_next_frame_y_offset(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_y_offset()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_y_offset); -+ return (0); -+} -+ -+png_uint_16 PNGAPI -+png_get_next_frame_delay_num(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_delay_num()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_delay_num); -+ return (0); -+} -+ -+png_uint_16 PNGAPI -+png_get_next_frame_delay_den(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_delay_den()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_delay_den); -+ return (0); -+} -+ -+png_byte PNGAPI -+png_get_next_frame_dispose_op(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_dispose_op()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_dispose_op); -+ return (0); -+} -+ -+png_byte PNGAPI -+png_get_next_frame_blend_op(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_get_next_frame_blend_op()"); -+ -+ if (png_ptr != NULL && info_ptr != NULL) -+ return (info_ptr->next_frame_blend_op); -+ return (0); -+} -+ -+png_byte PNGAPI -+png_get_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_first_frame_is_hidden()"); -+ -+ if (png_ptr != NULL) -+ return (png_byte)(png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN); -+ -+ PNG_UNUSED(info_ptr) -+ -+ return 0; -+} -+#endif /* PNG_APNG_SUPPORTED */ - #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ -diff -Naru libpng-1.5.15.org/pnginfo.h libpng-1.5.15/pnginfo.h ---- libpng-1.5.15.org/pnginfo.h 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pnginfo.h 2013-04-02 20:39:30.000000000 +0900 -@@ -265,5 +265,18 @@ - png_bytepp row_pointers; /* the image bits */ - #endif - -+#ifdef PNG_APNG_SUPPORTED -+ png_uint_32 num_frames; /* including default image */ -+ png_uint_32 num_plays; -+ png_uint_32 next_frame_width; -+ png_uint_32 next_frame_height; -+ png_uint_32 next_frame_x_offset; -+ png_uint_32 next_frame_y_offset; -+ png_uint_16 next_frame_delay_num; -+ png_uint_16 next_frame_delay_den; -+ png_byte next_frame_dispose_op; -+ png_byte next_frame_blend_op; -+#endif -+ - }; - #endif /* PNGINFO_H */ -diff -Naru libpng-1.5.15.org/pngpread.c libpng-1.5.15/pngpread.c ---- libpng-1.5.15.org/pngpread.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngpread.c 2013-04-02 20:39:30.000000000 +0900 -@@ -215,6 +215,109 @@ - - chunk_name = png_ptr->chunk_name; - -+#ifdef PNG_READ_APNG_SUPPORTED -+ if (png_ptr->num_frames_read > 0 && -+ png_ptr->num_frames_read < info_ptr->num_frames) -+ { -+ if (chunk_name == png_IDAT) -+ { -+ /* Discard trailing IDATs for the first frame */ -+ if (png_ptr->mode & PNG_HAVE_fcTL || png_ptr->num_frames_read > 1) -+ png_error(png_ptr, "out of place IDAT"); -+ -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ -+ png_push_crc_skip(png_ptr, png_ptr->push_length); -+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -+ return; -+ } -+ else if (chunk_name == png_fdAT) -+ { -+ if (png_ptr->buffer_size < 4) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ -+ png_ensure_sequence_number(png_ptr, 4); -+ -+ if (!(png_ptr->mode & PNG_HAVE_fcTL)) -+ { -+ /* Discard trailing fdATs for frames other than the first */ -+ if (png_ptr->num_frames_read < 2) -+ png_error(png_ptr, "out of place fdAT"); -+ -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ -+ png_push_crc_skip(png_ptr, png_ptr->push_length); -+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -+ return; -+ } -+ -+ else -+ { -+ /* frame data follows */ -+ png_ptr->idat_size = png_ptr->push_length - 4; -+ png_ptr->mode |= PNG_HAVE_IDAT; -+ png_ptr->process_mode = PNG_READ_IDAT_MODE; -+ -+ return; -+ } -+ } -+ -+ else if (chunk_name == png_fcTL) -+ { -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ -+ png_read_reset(png_ptr); -+ png_ptr->mode &= ~PNG_HAVE_fcTL; -+ -+ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length); -+ -+ if (!(png_ptr->mode & PNG_HAVE_fcTL)) -+ png_error(png_ptr, "missing required fcTL chunk"); -+ -+ png_read_reinit(png_ptr, info_ptr); -+ png_progressive_read_reset(png_ptr); -+ -+ if (png_ptr->frame_info_fn != NULL) -+ (*(png_ptr->frame_info_fn))(png_ptr, png_ptr->num_frames_read); -+ -+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -+ -+ return; -+ } -+ -+ else -+ { -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ png_warning(png_ptr, "Skipped (ignored) a chunk " -+ "between APNG chunks"); -+ png_push_crc_skip(png_ptr, png_ptr->push_length); -+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -+ return; -+ } -+ -+ return; -+ } -+#endif /* PNG_READ_APNG_SUPPORTED */ -+ - if (chunk_name == png_IDAT) - { - /* This is here above the if/else case statement below because if the -@@ -318,6 +421,10 @@ - png_benign_error(png_ptr, "Too many IDATs found"); - } - -+#ifdef PNG_READ_APNG_SUPPORTED -+ png_have_info(png_ptr, info_ptr); -+#endif -+ - png_ptr->idat_size = png_ptr->push_length; - png_ptr->mode |= PNG_HAVE_IDAT; - png_ptr->process_mode = PNG_READ_IDAT_MODE; -@@ -551,6 +658,28 @@ - - #endif - -+#ifdef PNG_READ_APNG_SUPPORTED -+ else if (chunk_name == png_acTL) -+ { -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ png_handle_acTL(png_ptr, info_ptr, png_ptr->push_length); -+ } -+ -+ else if (chunk_name == png_fcTL) -+ { -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length); -+ } -+#endif /* PNG_READ_APNG_SUPPORTED */ -+ - else - { - if (png_ptr->push_length + 4 > png_ptr->buffer_size) -@@ -758,7 +887,11 @@ - png_byte chunk_tag[4]; - - /* TODO: this code can be commoned up with the same code in push_read */ -+#ifdef PNG_READ_APNG_SUPPORTED -+ if (png_ptr->buffer_size < 12) -+#else - if (png_ptr->buffer_size < 8) -+#endif - { - png_push_save_buffer(png_ptr); - return; -@@ -771,17 +904,64 @@ - png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag); - png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; - -+#ifdef PNG_READ_APNG_SUPPORTED -+ if (png_ptr->chunk_name != png_fdAT && png_ptr->num_frames_read > 0) -+ { -+ if (png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) -+ { -+ png_ptr->process_mode = PNG_READ_CHUNK_MODE; -+ if (png_ptr->frame_end_fn != NULL) -+ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read); -+ png_ptr->num_frames_read++; -+ return; -+ } -+ else -+ { -+ if (png_ptr->chunk_name == png_IEND) -+ png_error(png_ptr, "Not enough image data"); -+ if (png_ptr->push_length + 4 > png_ptr->buffer_size) -+ { -+ png_push_save_buffer(png_ptr); -+ return; -+ } -+ png_warning(png_ptr, "Skipping (ignoring) a chunk between " -+ "APNG chunks"); -+ png_crc_finish(png_ptr, png_ptr->push_length); -+ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; -+ return; -+ } -+ } -+ else -+#endif -+#ifdef PNG_READ_APNG_SUPPORTED -+ if (png_ptr->chunk_name != png_IDAT && png_ptr->num_frames_read == 0) -+#else - if (png_ptr->chunk_name != png_IDAT) -+#endif - { - png_ptr->process_mode = PNG_READ_CHUNK_MODE; - - if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED)) - png_error(png_ptr, "Not enough compressed data"); - -+#ifdef PNG_READ_APNG_SUPPORTED -+ if (png_ptr->frame_end_fn != NULL) -+ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read); -+ png_ptr->num_frames_read++; -+#endif -+ - return; - } - - png_ptr->idat_size = png_ptr->push_length; -+ -+#ifdef PNG_READ_APNG_SUPPORTED -+ if (png_ptr->num_frames_read > 0) -+ { -+ png_ensure_sequence_number(png_ptr, 4); -+ png_ptr->idat_size -= 4; -+ } -+#endif - } - - if (png_ptr->idat_size && png_ptr->save_buffer_size) -@@ -859,6 +1039,15 @@ - if (!(buffer_length > 0) || buffer == NULL) - png_error(png_ptr, "No IDAT data (internal error)"); - -+#ifdef PNG_READ_APNG_SUPPORTED -+ /* If the app is not APNG-aware, decode only the first frame */ -+ if (!(png_ptr->apng_flags & PNG_APNG_APP) && png_ptr->num_frames_read > 0) -+ { -+ png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; -+ return; -+ } -+#endif -+ - /* This routine must process all the data it has been given - * before returning, calling the row callback as required to - * handle the uncompressed results. -@@ -1304,6 +1493,18 @@ - png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); - } - -+#ifdef PNG_READ_APNG_SUPPORTED -+void PNGAPI -+png_set_progressive_frame_fn(png_structp png_ptr, -+ png_progressive_frame_ptr frame_info_fn, -+ png_progressive_frame_ptr frame_end_fn) -+{ -+ png_ptr->frame_info_fn = frame_info_fn; -+ png_ptr->frame_end_fn = frame_end_fn; -+ png_ptr->apng_flags |= PNG_APNG_APP; -+} -+#endif -+ - png_voidp PNGAPI - png_get_progressive_ptr(png_const_structp png_ptr) - { -diff -Naru libpng-1.5.15.org/pngpriv.h libpng-1.5.15/pngpriv.h ---- libpng-1.5.15.org/pngpriv.h 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngpriv.h 2013-04-02 20:39:30.000000000 +0900 -@@ -461,6 +461,10 @@ - #define PNG_HAVE_PNG_SIGNATURE 0x1000 - #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ - #define PNG_HAVE_iCCP 0x4000 -+#ifdef PNG_APNG_SUPPORTED -+#define PNG_HAVE_acTL 0x8000 -+#define PNG_HAVE_fcTL 0x10000 -+#endif - - /* Flags for the transformations the PNG library does on the image data */ - #define PNG_BGR 0x0001 -@@ -658,6 +662,16 @@ - #define png_tRNS PNG_CHUNK(116, 82, 78, 83) - #define png_zTXt PNG_CHUNK(122, 84, 88, 116) - -+#ifdef PNG_APNG_SUPPORTED -+#define png_acTL PNG_CHUNK( 97, 99, 84, 76) -+#define png_fcTL PNG_CHUNK(102, 99, 84, 76) -+#define png_fdAT PNG_CHUNK(102, 100, 65, 84) -+ -+/* For png_struct.apng_flags: */ -+#define PNG_FIRST_FRAME_HIDDEN 0x0001 -+#define PNG_APNG_APP 0x0002 -+#endif -+ - /* The following will work on (signed char*) strings, whereas the get_uint_32 - * macro will fail on top-bit-set values because of the sign extension. - */ -@@ -1349,6 +1363,45 @@ - png_bytep row)); - #endif - -+#ifdef PNG_APNG_SUPPORTED -+PNG_EXTERN void png_ensure_fcTL_is_valid PNGARG((png_structp png_ptr, -+ png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, -+ png_byte dispose_op, png_byte blend_op)); -+ -+#ifdef PNG_READ_APNG_SUPPORTED -+PNG_EXTERN void png_handle_acTL PNGARG((png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 length)); -+PNG_EXTERN void png_handle_fcTL PNGARG((png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 length)); -+PNG_EXTERN void png_handle_fdAT PNGARG((png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 length)); -+PNG_EXTERN void png_have_info PNGARG((png_structp png_ptr, png_infop info_ptr)); -+PNG_EXTERN void png_ensure_sequence_number PNGARG((png_structp png_ptr, -+ png_uint_32 length)); -+PNG_EXTERN void png_read_reset PNGARG((png_structp png_ptr)); -+PNG_EXTERN void png_read_reinit PNGARG((png_structp png_ptr, -+ png_infop info_ptr)); -+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -+PNG_EXTERN void png_progressive_read_reset PNGARG((png_structp png_ptr)); -+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -+#endif /* PNG_READ_APNG_SUPPORTED */ -+ -+#ifdef PNG_WRITE_APNG_SUPPORTED -+PNG_EXTERN void png_write_acTL PNGARG((png_structp png_ptr, -+ png_uint_32 num_frames, png_uint_32 num_plays)); -+PNG_EXTERN void png_write_fcTL PNGARG((png_structp png_ptr, -+ png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, -+ png_byte dispose_op, png_byte blend_op)); -+PNG_EXTERN void png_write_reset PNGARG((png_structp png_ptr)); -+PNG_EXTERN void png_write_reinit PNGARG((png_structp png_ptr, -+ png_infop info_ptr, png_uint_32 width, png_uint_32 height)); -+#endif /* PNG_WRITE_APNG_SUPPORTED */ -+#endif /* PNG_APNG_SUPPORTED */ -+ - /* Added at libpng version 1.4.0 */ - #ifdef PNG_CHECK_cHRM_SUPPORTED - PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr, -diff -Naru libpng-1.5.15.org/pngread.c libpng-1.5.15/pngread.c ---- libpng-1.5.15.org/pngread.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngread.c 2013-04-02 20:39:30.000000000 +0900 -@@ -240,6 +240,9 @@ - !(png_ptr->mode & PNG_HAVE_PLTE)) - png_error(png_ptr, "Missing PLTE before IDAT"); - -+#ifdef PNG_READ_APNG_SUPPORTED -+ png_have_info(png_ptr, info_ptr); -+#endif - png_ptr->idat_size = length; - png_ptr->mode |= PNG_HAVE_IDAT; - break; -@@ -330,12 +333,90 @@ - png_handle_iTXt(png_ptr, info_ptr, length); - #endif - -+#ifdef PNG_READ_APNG_SUPPORTED -+ else if (chunk_name == png_acTL) -+ png_handle_acTL(png_ptr, info_ptr, length); -+ -+ else if (chunk_name == png_fcTL) -+ png_handle_fcTL(png_ptr, info_ptr, length); -+ -+ else if (chunk_name == png_fdAT) -+ png_handle_fdAT(png_ptr, info_ptr, length); -+#endif -+ - else - png_handle_unknown(png_ptr, info_ptr, length); - } - } - #endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ - -+#ifdef PNG_READ_APNG_SUPPORTED -+void PNGAPI -+png_read_frame_head(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_byte have_chunk_after_DAT; /* after IDAT or after fdAT */ -+ -+ png_debug(0, "Reading frame head"); -+ -+ if (!(png_ptr->mode & PNG_HAVE_acTL)) -+ png_error(png_ptr, "attempt to png_read_frame_head() but " -+ "no acTL present"); -+ -+ /* do nothing for the main IDAT */ -+ if (png_ptr->num_frames_read == 0) -+ return; -+ -+ png_crc_finish(png_ptr, 0); /* CRC from last IDAT or fdAT chunk */ -+ -+ png_read_reset(png_ptr); -+ png_ptr->mode &= ~PNG_HAVE_fcTL; -+ -+ have_chunk_after_DAT = 0; -+ for (;;) -+ { -+ png_uint_32 length = png_read_chunk_header(png_ptr); -+ -+ if (png_ptr->chunk_name == png_IDAT) -+ { -+ /* discard trailing IDATs for the first frame */ -+ if (have_chunk_after_DAT || png_ptr->num_frames_read > 1) -+ png_error(png_ptr, "png_read_frame_head(): out of place IDAT"); -+ png_crc_finish(png_ptr, length); -+ } -+ -+ else if (png_ptr->chunk_name == png_fcTL) -+ { -+ png_handle_fcTL(png_ptr, info_ptr, length); -+ have_chunk_after_DAT = 1; -+ } -+ -+ else if (png_ptr->chunk_name == png_fdAT) -+ { -+ png_ensure_sequence_number(png_ptr, length); -+ -+ /* discard trailing fdATs for frames other than the first */ -+ if (!have_chunk_after_DAT && png_ptr->num_frames_read > 1) -+ png_crc_finish(png_ptr, length - 4); -+ else if(png_ptr->mode & PNG_HAVE_fcTL) -+ { -+ png_ptr->idat_size = length - 4; -+ png_ptr->mode |= PNG_HAVE_IDAT; -+ -+ break; -+ } -+ else -+ png_error(png_ptr, "png_read_frame_head(): out of place fdAT"); -+ } -+ else -+ { -+ png_warning(png_ptr, "Skipped (ignored) a chunk " -+ "between APNG chunks"); -+ png_crc_finish(png_ptr, length); -+ } -+ } -+} -+#endif /* PNG_READ_APNG_SUPPORTED */ -+ - /* Optional call to update the users info_ptr structure */ - void PNGAPI - png_read_update_info(png_structp png_ptr, png_infop info_ptr) -@@ -537,6 +618,38 @@ - { - if (!(png_ptr->zstream.avail_in)) - { -+#ifdef PNG_READ_APNG_SUPPORTED -+ png_uint_32 bytes_to_skip = 0; -+ -+ while (!png_ptr->idat_size || bytes_to_skip != 0) -+ { -+ png_crc_finish(png_ptr, bytes_to_skip); -+ bytes_to_skip = 0; -+ -+ png_ptr->idat_size = png_read_chunk_header(png_ptr); -+ if (png_ptr->num_frames_read == 0) -+ { -+ if (png_ptr->chunk_name != png_IDAT) -+ png_error(png_ptr, "Not enough image data"); -+ } -+ else -+ { -+ if (png_ptr->chunk_name == png_IEND) -+ png_error(png_ptr, "Not enough image data"); -+ if (png_ptr->chunk_name != png_fdAT) -+ { -+ png_warning(png_ptr, "Skipped (ignored) a chunk " -+ "between APNG chunks"); -+ bytes_to_skip = png_ptr->idat_size; -+ continue; -+ } -+ -+ png_ensure_sequence_number(png_ptr, png_ptr->idat_size); -+ -+ png_ptr->idat_size -= 4; -+ } -+ } -+#else - while (!png_ptr->idat_size) - { - png_crc_finish(png_ptr, 0); -@@ -545,6 +658,7 @@ - if (png_ptr->chunk_name != png_IDAT) - png_error(png_ptr, "Not enough image data"); - } -+#endif - png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size; - png_ptr->zstream.next_in = png_ptr->zbuf; - if (png_ptr->zbuf_size > png_ptr->idat_size) -@@ -563,6 +677,9 @@ - png_benign_error(png_ptr, "Extra compressed data"); - png_ptr->mode |= PNG_AFTER_IDAT; - png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; -+#ifdef PNG_READ_APNG_SUPPORTED -+ png_ptr->num_frames_read++; -+#endif - break; - } - -diff -Naru libpng-1.5.15.org/pngrutil.c libpng-1.5.15/pngrutil.c ---- libpng-1.5.15.org/pngrutil.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngrutil.c 2013-04-02 20:39:30.000000000 +0900 -@@ -547,6 +547,11 @@ - filter_type = buf[11]; - interlace_type = buf[12]; - -+#ifdef PNG_READ_APNG_SUPPORTED -+ png_ptr->first_frame_width = width; -+ png_ptr->first_frame_height = height; -+#endif -+ - /* Set internal variables */ - png_ptr->width = width; - png_ptr->height = height; -@@ -2624,6 +2629,179 @@ - } - #endif - -+#ifdef PNG_READ_APNG_SUPPORTED -+void /* PRIVATE */ -+png_handle_acTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -+{ -+ png_byte data[8]; -+ png_uint_32 num_frames; -+ png_uint_32 num_plays; -+ png_uint_32 didSet; -+ -+ png_debug(1, "in png_handle_acTL"); -+ -+ if (!(png_ptr->mode & PNG_HAVE_IHDR)) -+ { -+ png_error(png_ptr, "Missing IHDR before acTL"); -+ } -+ else if (png_ptr->mode & PNG_HAVE_IDAT) -+ { -+ png_warning(png_ptr, "Invalid acTL after IDAT skipped"); -+ png_crc_finish(png_ptr, length); -+ return; -+ } -+ else if (png_ptr->mode & PNG_HAVE_acTL) -+ { -+ png_warning(png_ptr, "Duplicate acTL skipped"); -+ png_crc_finish(png_ptr, length); -+ return; -+ } -+ else if (length != 8) -+ { -+ png_warning(png_ptr, "acTL with invalid length skipped"); -+ png_crc_finish(png_ptr, length); -+ return; -+ } -+ -+ png_crc_read(png_ptr, data, 8); -+ png_crc_finish(png_ptr, 0); -+ -+ num_frames = png_get_uint_31(png_ptr, data); -+ num_plays = png_get_uint_31(png_ptr, data + 4); -+ -+ /* the set function will do error checking on num_frames */ -+ didSet = png_set_acTL(png_ptr, info_ptr, num_frames, num_plays); -+ if(didSet) -+ png_ptr->mode |= PNG_HAVE_acTL; -+} -+ -+void /* PRIVATE */ -+png_handle_fcTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -+{ -+ png_byte data[22]; -+ png_uint_32 width; -+ png_uint_32 height; -+ png_uint_32 x_offset; -+ png_uint_32 y_offset; -+ png_uint_16 delay_num; -+ png_uint_16 delay_den; -+ png_byte dispose_op; -+ png_byte blend_op; -+ -+ png_debug(1, "in png_handle_fcTL"); -+ -+ png_ensure_sequence_number(png_ptr, length); -+ -+ if (!(png_ptr->mode & PNG_HAVE_IHDR)) -+ { -+ png_error(png_ptr, "Missing IHDR before fcTL"); -+ } -+ else if (png_ptr->mode & PNG_HAVE_IDAT) -+ { -+ /* for any frames other then the first this message may be misleading, -+ * but correct. PNG_HAVE_IDAT is unset before the frame head is read -+ * i can't think of a better message */ -+ png_warning(png_ptr, "Invalid fcTL after IDAT skipped"); -+ png_crc_finish(png_ptr, length-4); -+ return; -+ } -+ else if (png_ptr->mode & PNG_HAVE_fcTL) -+ { -+ png_warning(png_ptr, "Duplicate fcTL within one frame skipped"); -+ png_crc_finish(png_ptr, length-4); -+ return; -+ } -+ else if (length != 26) -+ { -+ png_warning(png_ptr, "fcTL with invalid length skipped"); -+ png_crc_finish(png_ptr, length-4); -+ return; -+ } -+ -+ png_crc_read(png_ptr, data, 22); -+ png_crc_finish(png_ptr, 0); -+ -+ width = png_get_uint_31(png_ptr, data); -+ height = png_get_uint_31(png_ptr, data + 4); -+ x_offset = png_get_uint_31(png_ptr, data + 8); -+ y_offset = png_get_uint_31(png_ptr, data + 12); -+ delay_num = png_get_uint_16(data + 16); -+ delay_den = png_get_uint_16(data + 18); -+ dispose_op = data[20]; -+ blend_op = data[21]; -+ -+ if (png_ptr->num_frames_read == 0 && (x_offset != 0 || y_offset != 0)) -+ { -+ png_warning(png_ptr, "fcTL for the first frame must have zero offset"); -+ return; -+ } -+ -+ if (info_ptr != NULL) -+ { -+ if (png_ptr->num_frames_read == 0 && -+ (width != info_ptr->width || height != info_ptr->height)) -+ { -+ png_warning(png_ptr, "size in first frame's fcTL must match " -+ "the size in IHDR"); -+ return; -+ } -+ -+ /* The set function will do more error checking */ -+ png_set_next_frame_fcTL(png_ptr, info_ptr, width, height, -+ x_offset, y_offset, delay_num, delay_den, -+ dispose_op, blend_op); -+ -+ png_read_reinit(png_ptr, info_ptr); -+ -+ png_ptr->mode |= PNG_HAVE_fcTL; -+ } -+} -+ -+void /* PRIVATE */ -+png_have_info(png_structp png_ptr, png_infop info_ptr) -+{ -+ if((info_ptr->valid & PNG_INFO_acTL) && !(info_ptr->valid & PNG_INFO_fcTL)) -+ { -+ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN; -+ info_ptr->num_frames++; -+ } -+} -+ -+void /* PRIVATE */ -+png_handle_fdAT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) -+{ -+ png_ensure_sequence_number(png_ptr, length); -+ -+ /* This function is only called from png_read_end(), png_read_info(), -+ * and png_push_read_chunk() which means that: -+ * - the user doesn't want to read this frame -+ * - or this is an out-of-place fdAT -+ * in either case it is safe to ignore the chunk with a warning */ -+ png_warning(png_ptr, "ignoring fdAT chunk"); -+ png_crc_finish(png_ptr, length - 4); -+ PNG_UNUSED(info_ptr) -+} -+ -+void /* PRIVATE */ -+png_ensure_sequence_number(png_structp png_ptr, png_uint_32 length) -+{ -+ png_byte data[4]; -+ png_uint_32 sequence_number; -+ -+ if (length < 4) -+ png_error(png_ptr, "invalid fcTL or fdAT chunk found"); -+ -+ png_crc_read(png_ptr, data, 4); -+ sequence_number = png_get_uint_31(png_ptr, data); -+ -+ if (sequence_number != png_ptr->next_seq_num) -+ png_error(png_ptr, "fcTL or fdAT chunk with out-of-order sequence " -+ "number found"); -+ -+ png_ptr->next_seq_num++; -+} -+#endif /* PNG_READ_APNG_SUPPORTED */ -+ - /* This function is called when we haven't found a handler for a - * chunk. If there isn't a problem with the chunk itself (ie bad - * chunk name, CRC, or a critical chunk), the chunk is silently ignored -@@ -4114,4 +4292,81 @@ - - png_ptr->flags |= PNG_FLAG_ROW_INIT; - } -+ -+#ifdef PNG_READ_APNG_SUPPORTED -+/* This function is to be called after the main IDAT set has been read and -+ * before a new IDAT is read. It resets some parts of png_ptr -+ * to make them usable by the read functions again */ -+void /* PRIVATE */ -+png_read_reset(png_structp png_ptr) -+{ -+ png_ptr->mode &= ~PNG_HAVE_IDAT; -+ png_ptr->mode &= ~PNG_AFTER_IDAT; -+ png_ptr->row_number = 0; -+ png_ptr->pass = 0; -+ png_ptr->flags &= ~PNG_FLAG_ROW_INIT; -+} -+ -+void /* PRIVATE */ -+png_read_reinit(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_ptr->width = info_ptr->next_frame_width; -+ png_ptr->height = info_ptr->next_frame_height; -+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width); -+ png_ptr->info_rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, -+ png_ptr->width); -+ if (png_ptr->prev_row) -+ png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); -+} -+ -+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -+/* same as png_read_reset() but for the progressive reader */ -+void /* PRIVATE */ -+png_progressive_read_reset(png_structp png_ptr) -+{ -+#ifdef PNG_READ_INTERLACING_SUPPORTED -+ /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ -+ -+ /* Start of interlace block */ -+ const int FARDATA png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; -+ -+ /* Offset to next interlace block */ -+ const int FARDATA png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; -+ -+ /* Start of interlace block in the y direction */ -+ const int FARDATA png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; -+ -+ /* Offset to next interlace block in the y direction */ -+ const int FARDATA png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; -+ -+ if (png_ptr->interlaced) -+ { -+ if (!(png_ptr->transformations & PNG_INTERLACE)) -+ png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - -+ png_pass_ystart[0]) / png_pass_yinc[0]; -+ else -+ png_ptr->num_rows = png_ptr->height; -+ -+ png_ptr->iwidth = (png_ptr->width + -+ png_pass_inc[png_ptr->pass] - 1 - -+ png_pass_start[png_ptr->pass]) / -+ png_pass_inc[png_ptr->pass]; -+ } -+ else -+#endif /* PNG_READ_INTERLACING_SUPPORTED */ -+ { -+ png_ptr->num_rows = png_ptr->height; -+ png_ptr->iwidth = png_ptr->width; -+ } -+ png_ptr->flags &= ~PNG_FLAG_ZLIB_FINISHED; -+ if (inflateReset(&(png_ptr->zstream)) != Z_OK) -+ png_error(png_ptr, "inflateReset failed"); -+ png_ptr->zstream.avail_in = 0; -+ png_ptr->zstream.next_in = 0; -+ png_ptr->zstream.next_out = png_ptr->row_buf; -+ png_ptr->zstream.avail_out = (uInt)PNG_ROWBYTES(png_ptr->pixel_depth, -+ png_ptr->iwidth) + 1; -+} -+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ -+#endif /* PNG_READ_APNG_SUPPORTED */ - #endif /* PNG_READ_SUPPORTED */ -diff -Naru libpng-1.5.15.org/pngset.c libpng-1.5.15/pngset.c ---- libpng-1.5.15.org/pngset.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngset.c 2013-04-02 20:39:30.000000000 +0900 -@@ -262,6 +262,11 @@ - info_ptr->rowbytes = 0; - else - info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); -+ -+#ifdef PNG_APNG_SUPPORTED -+ /* for non-animated png. this may be overwritten from an acTL chunk later */ -+ info_ptr->num_frames = 1; -+#endif - } - - #ifdef PNG_oFFs_SUPPORTED -@@ -1048,6 +1053,147 @@ - } - #endif /* PNG_sPLT_SUPPORTED */ - -+#ifdef PNG_APNG_SUPPORTED -+png_uint_32 PNGAPI -+png_set_acTL(png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 num_frames, png_uint_32 num_plays) -+{ -+ png_debug1(1, "in %s storage function", "acTL"); -+ -+ if (png_ptr == NULL || info_ptr == NULL) -+ { -+ png_warning(png_ptr, -+ "Call to png_set_acTL() with NULL png_ptr " -+ "or info_ptr ignored"); -+ return (0); -+ } -+ if (num_frames == 0) -+ { -+ png_warning(png_ptr, -+ "Ignoring attempt to set acTL with num_frames zero"); -+ return (0); -+ } -+ if (num_frames > PNG_UINT_31_MAX) -+ { -+ png_warning(png_ptr, -+ "Ignoring attempt to set acTL with num_frames > 2^31-1"); -+ return (0); -+ } -+ if (num_plays > PNG_UINT_31_MAX) -+ { -+ png_warning(png_ptr, -+ "Ignoring attempt to set acTL with num_plays " -+ "> 2^31-1"); -+ return (0); -+ } -+ -+ info_ptr->num_frames = num_frames; -+ info_ptr->num_plays = num_plays; -+ -+ info_ptr->valid |= PNG_INFO_acTL; -+ -+ return (1); -+} -+ -+/* delay_num and delay_den can hold any 16-bit values including zero */ -+png_uint_32 PNGAPI -+png_set_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, -+ png_byte dispose_op, png_byte blend_op) -+{ -+ png_debug1(1, "in %s storage function", "fcTL"); -+ -+ if (png_ptr == NULL || info_ptr == NULL) -+ { -+ png_warning(png_ptr, -+ "Call to png_set_fcTL() with NULL png_ptr or info_ptr " -+ "ignored"); -+ return (0); -+ } -+ -+ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset, -+ delay_num, delay_den, dispose_op, blend_op); -+ -+ if (blend_op == PNG_BLEND_OP_OVER) -+ { -+ if (!(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) && -+ !(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) -+ { -+ png_warning(png_ptr, "PNG_BLEND_OP_OVER is meaningless " -+ "and wasteful for opaque images, ignored"); -+ blend_op = PNG_BLEND_OP_SOURCE; -+ } -+ } -+ -+ info_ptr->next_frame_width = width; -+ info_ptr->next_frame_height = height; -+ info_ptr->next_frame_x_offset = x_offset; -+ info_ptr->next_frame_y_offset = y_offset; -+ info_ptr->next_frame_delay_num = delay_num; -+ info_ptr->next_frame_delay_den = delay_den; -+ info_ptr->next_frame_dispose_op = dispose_op; -+ info_ptr->next_frame_blend_op = blend_op; -+ -+ info_ptr->valid |= PNG_INFO_fcTL; -+ -+ return (1); -+} -+ -+void /* PRIVATE */ -+png_ensure_fcTL_is_valid(png_structp png_ptr, -+ png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, -+ png_byte dispose_op, png_byte blend_op) -+{ -+ if (width + x_offset > png_ptr->first_frame_width || -+ height + y_offset > png_ptr->first_frame_height) -+ png_error(png_ptr, "dimensions of a frame are greater than" -+ "the ones in IHDR"); -+ if (width > PNG_UINT_31_MAX) -+ png_error(png_ptr, "invalid width in fcTL (> 2^31-1)"); -+ if (height > PNG_UINT_31_MAX) -+ png_error(png_ptr, "invalid height in fcTL (> 2^31-1)"); -+ if (x_offset > PNG_UINT_31_MAX) -+ png_error(png_ptr, "invalid x_offset in fcTL (> 2^31-1)"); -+ if (y_offset > PNG_UINT_31_MAX) -+ png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)"); -+ -+ if (dispose_op != PNG_DISPOSE_OP_NONE && -+ dispose_op != PNG_DISPOSE_OP_BACKGROUND && -+ dispose_op != PNG_DISPOSE_OP_PREVIOUS) -+ png_error(png_ptr, "invalid dispose_op in fcTL"); -+ -+ if (blend_op != PNG_BLEND_OP_SOURCE && -+ blend_op != PNG_BLEND_OP_OVER) -+ png_error(png_ptr, "invalid blend_op in fcTL"); -+ -+ PNG_UNUSED(delay_num) -+ PNG_UNUSED(delay_den) -+} -+ -+png_uint_32 PNGAPI -+png_set_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr, -+ png_byte is_hidden) -+{ -+ png_debug(1, "in png_first_frame_is_hidden()"); -+ -+ if (png_ptr == NULL) -+ return 0; -+ -+ if (is_hidden) -+ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN; -+ else -+ png_ptr->apng_flags &= ~PNG_FIRST_FRAME_HIDDEN; -+ -+ PNG_UNUSED(info_ptr) -+ -+ return 1; -+} -+#endif /* PNG_APNG_SUPPORTED */ -+ - #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED - void PNGAPI - png_set_unknown_chunks(png_structp png_ptr, -diff -Naru libpng-1.5.15.org/pngstruct.h libpng-1.5.15/pngstruct.h ---- libpng-1.5.15.org/pngstruct.h 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngstruct.h 2013-04-02 20:39:30.000000000 +0900 -@@ -293,6 +293,27 @@ - png_byte filter_type; - #endif - -+#ifdef PNG_APNG_SUPPORTED -+ png_uint_32 apng_flags; -+ png_uint_32 next_seq_num; /* next fcTL/fdAT chunk sequence number */ -+ png_uint_32 first_frame_width; -+ png_uint_32 first_frame_height; -+ -+#ifdef PNG_READ_APNG_SUPPORTED -+ png_uint_32 num_frames_read; /* incremented after all image data of */ -+ /* a frame is read */ -+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED -+ png_progressive_frame_ptr frame_info_fn; /* frame info read callback */ -+ png_progressive_frame_ptr frame_end_fn; /* frame data read callback */ -+#endif -+#endif -+ -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ png_uint_32 num_frames_to_write; -+ png_uint_32 num_frames_written; -+#endif -+#endif /* PNG_APNG_SUPPORTED */ -+ - /* New members added in libpng-1.2.0 */ - - /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ -diff -Naru libpng-1.5.15.org/pngtest.c libpng-1.5.15/pngtest.c ---- libpng-1.5.15.org/pngtest.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngtest.c 2013-04-02 20:39:30.000000000 +0900 -@@ -822,6 +822,10 @@ - png_uint_32 width, height; - int num_pass, pass; - int bit_depth, color_type; -+#ifdef PNG_APNG_SUPPORTED -+ png_uint_32 num_frames; -+ png_uint_32 num_plays; -+#endif - - row_buf = NULL; - error_parameters.file_name = inname; -@@ -1271,6 +1275,20 @@ - } - } - #endif -+#ifdef PNG_APNG_SUPPORTED -+ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL)) -+ { -+ if (png_get_acTL(read_ptr, read_info_ptr, &num_frames, &num_plays)) -+ { -+ png_byte is_hidden; -+ pngtest_debug2("Handling acTL chunks (frames %ld, plays %ld)", -+ num_frames, num_plays); -+ png_set_acTL(write_ptr, write_info_ptr, num_frames, num_plays); -+ is_hidden = png_get_first_frame_is_hidden(read_ptr, read_info_ptr); -+ png_set_first_frame_is_hidden(write_ptr, write_info_ptr, is_hidden); -+ } -+ } -+#endif - #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED - { - png_unknown_chunkp unknowns; -@@ -1336,6 +1354,89 @@ - t_misc += (t_stop - t_start); - t_start = t_stop; - #endif -+#ifdef PNG_APNG_SUPPORTED -+ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL)) -+ { -+ png_uint_32 frame; -+ for (frame = 0; frame < num_frames; frame++) -+ { -+ png_uint_32 frame_width; -+ png_uint_32 frame_height; -+ png_uint_32 x_offset; -+ png_uint_32 y_offset; -+ png_uint_16 delay_num; -+ png_uint_16 delay_den; -+ png_byte dispose_op; -+ png_byte blend_op; -+ png_read_frame_head(read_ptr, read_info_ptr); -+ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_fcTL)) -+ { -+ png_get_next_frame_fcTL(read_ptr, read_info_ptr, -+ &frame_width, &frame_height, -+ &x_offset, &y_offset, -+ &delay_num, &delay_den, -+ &dispose_op, &blend_op); -+ } -+ else -+ { -+ frame_width = width; -+ frame_height = height; -+ x_offset = 0; -+ y_offset = 0; -+ delay_num = 1; -+ delay_den = 1; -+ dispose_op = PNG_DISPOSE_OP_NONE; -+ blend_op = PNG_BLEND_OP_SOURCE; -+ } -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ png_write_frame_head(write_ptr, write_info_ptr, (png_bytepp)&row_buf, -+ frame_width, frame_height, -+ x_offset, y_offset, -+ delay_num, delay_den, -+ dispose_op, blend_op); -+#endif -+ for (pass = 0; pass < num_pass; pass++) -+ { -+ pngtest_debug1("Writing row data for pass %d", pass); -+ for (y = 0; y < frame_height; y++) -+ { -+#ifndef SINGLE_ROWBUF_ALLOC -+ pngtest_debug2("Allocating row buffer (pass %d, y = %ld)...", pass, y); -+ row_buf = (png_bytep)png_malloc(read_ptr, -+ png_get_rowbytes(read_ptr, read_info_ptr)); -+ pngtest_debug2("0x%08lx (%ld bytes)", (unsigned long)row_buf, -+ png_get_rowbytes(read_ptr, read_info_ptr)); -+#endif /* !SINGLE_ROWBUF_ALLOC */ -+ png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1); -+ -+#ifdef PNG_WRITE_SUPPORTED -+#ifdef PNGTEST_TIMING -+ t_stop = (float)clock(); -+ t_decode += (t_stop - t_start); -+ t_start = t_stop; -+#endif -+ png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); -+#ifdef PNGTEST_TIMING -+ t_stop = (float)clock(); -+ t_encode += (t_stop - t_start); -+ t_start = t_stop; -+#endif -+#endif /* PNG_WRITE_SUPPORTED */ -+ -+#ifndef SINGLE_ROWBUF_ALLOC -+ pngtest_debug2("Freeing row buffer (pass %d, y = %ld)", pass, y); -+ png_free(read_ptr, row_buf); -+ row_buf = NULL; -+#endif /* !SINGLE_ROWBUF_ALLOC */ -+ } -+ } -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ png_write_frame_tail(write_ptr, write_info_ptr); -+#endif -+ } -+ } -+ else -+#endif - for (pass = 0; pass < num_pass; pass++) - { - pngtest_debug1("Writing row data for pass %d", pass); -diff -Naru libpng-1.5.15.org/pngwrite.c libpng-1.5.15/pngwrite.c ---- libpng-1.5.15.org/pngwrite.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngwrite.c 2013-04-02 20:39:30.000000000 +0900 -@@ -58,6 +58,10 @@ - /* The rest of these check to see if the valid field has the appropriate - * flag set, and if it does, writes the chunk. - */ -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ if (info_ptr->valid & PNG_INFO_acTL) -+ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays); -+#endif - #ifdef PNG_WRITE_gAMA_SUPPORTED - if (info_ptr->valid & PNG_INFO_gAMA) - png_write_gAMA_fixed(png_ptr, info_ptr->gamma); -@@ -310,6 +314,11 @@ - png_benign_error(png_ptr, "Wrote palette index exceeding num_palette"); - #endif - -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ if (png_ptr->num_frames_written != png_ptr->num_frames_to_write) -+ png_error(png_ptr, "Not enough frames written"); -+#endif -+ - /* See if user wants us to write information chunks */ - if (info_ptr != NULL) - { -@@ -1667,4 +1676,42 @@ - PNG_UNUSED(params) - } - #endif -+ -+#ifdef PNG_WRITE_APNG_SUPPORTED -+void PNGAPI -+png_write_frame_head(png_structp png_ptr, png_infop info_ptr, -+ png_bytepp row_pointers, png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, -+ png_byte blend_op) -+{ -+ png_debug(1, "in png_write_frame_head"); -+ -+ /* there is a chance this has been set after png_write_info was called, -+ * so it would be set but not written. is there a way to be sure? */ -+ if (!(info_ptr->valid & PNG_INFO_acTL)) -+ png_error(png_ptr, "png_write_frame_head(): acTL not set"); -+ -+ png_write_reset(png_ptr); -+ -+ png_write_reinit(png_ptr, info_ptr, width, height); -+ -+ if ( !(png_ptr->num_frames_written == 0 && -+ (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ) ) -+ png_write_fcTL(png_ptr, width, height, x_offset, y_offset, -+ delay_num, delay_den, dispose_op, blend_op); -+ -+ PNG_UNUSED(row_pointers) -+} -+ -+void PNGAPI -+png_write_frame_tail(png_structp png_ptr, png_infop info_ptr) -+{ -+ png_debug(1, "in png_write_frame_tail"); -+ -+ png_ptr->num_frames_written++; -+ -+ PNG_UNUSED(info_ptr) -+} -+#endif /* PNG_WRITE_APNG_SUPPORTED */ - #endif /* PNG_WRITE_SUPPORTED */ -diff -Naru libpng-1.5.15.org/pngwutil.c libpng-1.5.15/pngwutil.c ---- libpng-1.5.15.org/pngwutil.c 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/pngwutil.c 2013-04-02 20:39:30.000000000 +0900 -@@ -818,6 +818,11 @@ - /* Write the chunk */ - png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13); - -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ png_ptr->first_frame_width = width; -+ png_ptr->first_frame_height = height; -+#endif -+ - /* Initialize zlib with PNG info */ - png_ptr->zstream.zalloc = png_zalloc; - png_ptr->zstream.zfree = png_zfree; -@@ -1032,7 +1037,28 @@ - } - #endif /* PNG_WRITE_OPTIMIZE_CMF_SUPPORTED */ - -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ if (png_ptr->num_frames_written == 0) -+#endif - png_write_complete_chunk(png_ptr, png_IDAT, data, length); -+#ifdef PNG_WRITE_APNG_SUPPORTED -+ else -+ { -+ png_byte buf[4]; -+ -+ png_write_chunk_header(png_ptr, png_fdAT, 4 + length); -+ -+ png_save_uint_32(buf, png_ptr->next_seq_num); -+ png_write_chunk_data(png_ptr, buf, 4); -+ -+ png_write_chunk_data(png_ptr, data, length); -+ -+ png_write_chunk_end(png_ptr); -+ -+ png_ptr->next_seq_num++; -+ } -+#endif /* PNG_WRITE_APNG_SUPPORTED */ -+ - png_ptr->mode |= PNG_HAVE_IDAT; - - /* Prior to 1.5.4 this code was replicated in every caller (except at the -@@ -1995,6 +2021,64 @@ - } - #endif - -+#ifdef PNG_WRITE_APNG_SUPPORTED -+void /* PRIVATE */ -+png_write_acTL(png_structp png_ptr, -+ png_uint_32 num_frames, png_uint_32 num_plays) -+{ -+ png_byte buf[8]; -+ -+ png_debug(1, "in png_write_acTL"); -+ -+ png_ptr->num_frames_to_write = num_frames; -+ -+ if (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) -+ num_frames--; -+ -+ png_save_uint_32(buf, num_frames); -+ png_save_uint_32(buf + 4, num_plays); -+ -+ png_write_complete_chunk(png_ptr, png_acTL, buf, (png_size_t)8); -+} -+ -+void /* PRIVATE */ -+png_write_fcTL(png_structp png_ptr, png_uint_32 width, png_uint_32 height, -+ png_uint_32 x_offset, png_uint_32 y_offset, -+ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, -+ png_byte blend_op) -+{ -+ png_byte buf[26]; -+ -+ png_debug(1, "in png_write_fcTL"); -+ -+ if (png_ptr->num_frames_written == 0 && (x_offset != 0 || y_offset != 0)) -+ png_error(png_ptr, "x and/or y offset for the first frame aren't 0"); -+ if (png_ptr->num_frames_written == 0 && -+ (width != png_ptr->first_frame_width || -+ height != png_ptr->first_frame_height)) -+ png_error(png_ptr, "width and/or height in the first frame's fcTL " -+ "don't match the ones in IHDR"); -+ -+ /* more error checking */ -+ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset, -+ delay_num, delay_den, dispose_op, blend_op); -+ -+ png_save_uint_32(buf, png_ptr->next_seq_num); -+ png_save_uint_32(buf + 4, width); -+ png_save_uint_32(buf + 8, height); -+ png_save_uint_32(buf + 12, x_offset); -+ png_save_uint_32(buf + 16, y_offset); -+ png_save_uint_16(buf + 20, delay_num); -+ png_save_uint_16(buf + 22, delay_den); -+ buf[24] = dispose_op; -+ buf[25] = blend_op; -+ -+ png_write_complete_chunk(png_ptr, png_fcTL, buf, (png_size_t)26); -+ -+ png_ptr->next_seq_num++; -+} -+#endif /* PNG_WRITE_APNG_SUPPORTED */ -+ - /* Initializes the row writing capability of libpng */ - void /* PRIVATE */ - png_write_start_row(png_structp png_ptr) -@@ -3174,4 +3258,39 @@ - } - #endif - } -+ -+#ifdef PNG_WRITE_APNG_SUPPORTED -+void /* PRIVATE */ -+png_write_reset(png_structp png_ptr) -+{ -+ png_ptr->row_number = 0; -+ png_ptr->pass = 0; -+ png_ptr->mode &= ~PNG_HAVE_IDAT; -+} -+ -+void /* PRIVATE */ -+png_write_reinit(png_structp png_ptr, png_infop info_ptr, -+ png_uint_32 width, png_uint_32 height) -+{ -+ if (png_ptr->num_frames_written == 0 && -+ (width != png_ptr->first_frame_width || -+ height != png_ptr->first_frame_height)) -+ png_error(png_ptr, "width and/or height in the first frame's fcTL " -+ "don't match the ones in IHDR"); -+ if (width > png_ptr->first_frame_width || -+ height > png_ptr->first_frame_height) -+ png_error(png_ptr, "width and/or height for a frame greater than" -+ "the ones in IHDR"); -+ -+ png_set_IHDR(png_ptr, info_ptr, width, height, -+ info_ptr->bit_depth, info_ptr->color_type, -+ info_ptr->interlace_type, info_ptr->compression_type, -+ info_ptr->filter_type); -+ -+ png_ptr->width = width; -+ png_ptr->height = height; -+ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width); -+ png_ptr->usr_width = png_ptr->width; -+} -+#endif /* PNG_WRITE_APNG_SUPPORTED */ - #endif /* PNG_WRITE_SUPPORTED */ -diff -Naru libpng-1.5.15.org/scripts/symbols.def libpng-1.5.15/scripts/symbols.def ---- libpng-1.5.15.org/scripts/symbols.def 2013-04-02 20:39:30.000000000 +0900 -+++ libpng-1.5.15/scripts/symbols.def 2013-04-02 20:39:30.000000000 +0900 -@@ -242,3 +242,23 @@ - png_set_check_for_invalid_index @234 - png_get_palette_max @235 - png_set_option @236 -+ png_get_acTL @237 -+ png_set_acTL @238 -+ png_get_num_frames @239 -+ png_get_num_plays @240 -+ png_get_next_frame_fcTL @241 -+ png_set_next_frame_fcTL @242 -+ png_get_next_frame_width @243 -+ png_get_next_frame_height @244 -+ png_get_next_frame_x_offset @245 -+ png_get_next_frame_y_offset @246 -+ png_get_next_frame_delay_num @247 -+ png_get_next_frame_delay_den @248 -+ png_get_next_frame_dispose_op @249 -+ png_get_next_frame_blend_op @250 -+ png_get_first_frame_is_hidden @251 -+ png_set_first_frame_is_hidden @252 -+ png_read_frame_head @253 -+ png_set_progressive_frame_fn @254 -+ png_write_frame_head @255 -+ png_write_frame_tail @256 diff --git a/package/libpng/patches/libpng-1.6.8-apng.patch b/package/libpng/patches/libpng-1.6.8-apng.patch new file mode 100644 index 000000000..02cf32620 --- /dev/null +++ b/package/libpng/patches/libpng-1.6.8-apng.patch @@ -0,0 +1,1701 @@ +diff -Naru libpng-1.6.8.org/png.h libpng-1.6.8/png.h +--- libpng-1.6.8.org/png.h 2013-12-22 17:03:17.220988502 +0900 ++++ libpng-1.6.8/png.h 2013-12-22 17:03:17.287990651 +0900 +@@ -451,6 +451,10 @@ + # include "pnglibconf.h" + #endif + ++#define PNG_APNG_SUPPORTED ++#define PNG_READ_APNG_SUPPORTED ++#define PNG_WRITE_APNG_SUPPORTED ++ + #ifndef PNG_VERSION_INFO_ONLY + /* Machine specific configuration. */ + # include "pngconf.h" +@@ -541,6 +545,17 @@ + * See pngconf.h for base types that vary by machine/system + */ + ++#ifdef PNG_APNG_SUPPORTED ++/* dispose_op flags from inside fcTL */ ++#define PNG_DISPOSE_OP_NONE 0x00 ++#define PNG_DISPOSE_OP_BACKGROUND 0x01 ++#define PNG_DISPOSE_OP_PREVIOUS 0x02 ++ ++/* blend_op flags from inside fcTL */ ++#define PNG_BLEND_OP_SOURCE 0x00 ++#define PNG_BLEND_OP_OVER 0x01 ++#endif /* PNG_APNG_SUPPORTED */ ++ + /* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +@@ -861,6 +876,10 @@ + #define PNG_INFO_sPLT 0x2000 /* ESR, 1.0.6 */ + #define PNG_INFO_sCAL 0x4000 /* ESR, 1.0.6 */ + #define PNG_INFO_IDAT 0x8000 /* ESR, 1.0.6 */ ++#ifdef PNG_APNG_SUPPORTED ++#define PNG_INFO_acTL 0x10000 ++#define PNG_INFO_fcTL 0x20000 ++#endif + + /* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using +@@ -898,6 +917,10 @@ + #ifdef PNG_PROGRESSIVE_READ_SUPPORTED + typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); + typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); ++#ifdef PNG_APNG_SUPPORTED ++typedef PNG_CALLBACK(void, *png_progressive_frame_ptr, (png_structp, ++ png_uint_32)); ++#endif + + /* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the +@@ -3300,6 +3323,74 @@ + /******************************************************************************* + * END OF HARDWARE OPTIONS + ******************************************************************************/ ++#ifdef PNG_APNG_SUPPORTED ++PNG_EXPORT(245, png_uint_32, png_get_acTL, (png_structp png_ptr, ++ png_infop info_ptr, png_uint_32 *num_frames, png_uint_32 *num_plays)); ++ ++PNG_EXPORT(246, png_uint_32, png_set_acTL, (png_structp png_ptr, ++ png_infop info_ptr, png_uint_32 num_frames, png_uint_32 num_plays)); ++ ++PNG_EXPORT(247, png_uint_32, png_get_num_frames, (png_structp png_ptr, ++ png_infop info_ptr)); ++ ++PNG_EXPORT(248, png_uint_32, png_get_num_plays, (png_structp png_ptr, ++ png_infop info_ptr)); ++ ++PNG_EXPORT(249, png_uint_32, png_get_next_frame_fcTL, ++ (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, ++ png_uint_32 *height, png_uint_32 *x_offset, png_uint_32 *y_offset, ++ png_uint_16 *delay_num, png_uint_16 *delay_den, png_byte *dispose_op, ++ png_byte *blend_op)); ++ ++PNG_EXPORT(250, png_uint_32, png_set_next_frame_fcTL, ++ (png_structp png_ptr, png_infop info_ptr, png_uint_32 width, ++ png_uint_32 height, png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, ++ png_byte blend_op)); ++ ++PNG_EXPORT(251, png_uint_32, png_get_next_frame_width, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(252, png_uint_32, png_get_next_frame_height, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(253, png_uint_32, png_get_next_frame_x_offset, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(254, png_uint_32, png_get_next_frame_y_offset, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(255, png_uint_16, png_get_next_frame_delay_num, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(256, png_uint_16, png_get_next_frame_delay_den, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(257, png_byte, png_get_next_frame_dispose_op, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(258, png_byte, png_get_next_frame_blend_op, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(259, png_byte, png_get_first_frame_is_hidden, ++ (png_structp png_ptr, png_infop info_ptr)); ++PNG_EXPORT(260, png_uint_32, png_set_first_frame_is_hidden, ++ (png_structp png_ptr, png_infop info_ptr, png_byte is_hidden)); ++ ++#ifdef PNG_READ_APNG_SUPPORTED ++PNG_EXPORT(261, void, png_read_frame_head, (png_structp png_ptr, ++ png_infop info_ptr)); ++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED ++PNG_EXPORT(262, void, png_set_progressive_frame_fn, (png_structp png_ptr, ++ png_progressive_frame_ptr frame_info_fn, ++ png_progressive_frame_ptr frame_end_fn)); ++#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ ++#endif /* PNG_READ_APNG_SUPPORTED */ ++ ++#ifdef PNG_WRITE_APNG_SUPPORTED ++PNG_EXPORT(263, void, png_write_frame_head, (png_structp png_ptr, ++ png_infop info_ptr, png_bytepp row_pointers, ++ png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, ++ png_byte blend_op)); ++ ++PNG_EXPORT(264, void, png_write_frame_tail, (png_structp png_ptr, ++ png_infop info_ptr)); ++#endif /* PNG_WRITE_APNG_SUPPORTED */ ++#endif /* PNG_APNG_SUPPORTED */ + + /* Maintainer: Put new public prototypes here ^, in libpng.3, and project + * defs, scripts/pnglibconf.h, and scripts/pnglibconf.h.prebuilt +@@ -3310,7 +3401,11 @@ + * scripts/symbols.def as well. + */ + #ifdef PNG_EXPORT_LAST_ORDINAL ++#ifdef PNG_APNG_SUPPORTED ++ PNG_EXPORT_LAST_ORDINAL(264); ++#else + PNG_EXPORT_LAST_ORDINAL(244); ++#endif /* PNG_APNG_SUPPORTED */ + #endif + + #ifdef __cplusplus +diff -Naru libpng-1.6.8.org/pngget.c libpng-1.6.8/pngget.c +--- libpng-1.6.8.org/pngget.c 2013-12-22 17:03:17.220988502 +0900 ++++ libpng-1.6.8/pngget.c 2013-12-22 17:03:17.288990684 +0900 +@@ -1174,4 +1174,166 @@ + # endif + #endif + ++#ifdef PNG_APNG_SUPPORTED ++png_uint_32 PNGAPI ++png_get_acTL(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 *num_frames, png_uint_32 *num_plays) ++{ ++ png_debug1(1, "in %s retrieval function", "acTL"); ++ ++ if (png_ptr != NULL && info_ptr != NULL && ++ (info_ptr->valid & PNG_INFO_acTL) && ++ num_frames != NULL && num_plays != NULL) ++ { ++ *num_frames = info_ptr->num_frames; ++ *num_plays = info_ptr->num_plays; ++ return (1); ++ } ++ ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_num_frames(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_num_frames()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->num_frames); ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_num_plays(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_num_plays()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->num_plays); ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 *width, png_uint_32 *height, ++ png_uint_32 *x_offset, png_uint_32 *y_offset, ++ png_uint_16 *delay_num, png_uint_16 *delay_den, ++ png_byte *dispose_op, png_byte *blend_op) ++{ ++ png_debug1(1, "in %s retrieval function", "fcTL"); ++ ++ if (png_ptr != NULL && info_ptr != NULL && ++ (info_ptr->valid & PNG_INFO_fcTL) && ++ width != NULL && height != NULL && ++ x_offset != NULL && y_offset != NULL && ++ delay_num != NULL && delay_den != NULL && ++ dispose_op != NULL && blend_op != NULL) ++ { ++ *width = info_ptr->next_frame_width; ++ *height = info_ptr->next_frame_height; ++ *x_offset = info_ptr->next_frame_x_offset; ++ *y_offset = info_ptr->next_frame_y_offset; ++ *delay_num = info_ptr->next_frame_delay_num; ++ *delay_den = info_ptr->next_frame_delay_den; ++ *dispose_op = info_ptr->next_frame_dispose_op; ++ *blend_op = info_ptr->next_frame_blend_op; ++ return (1); ++ } ++ ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_next_frame_width(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_width()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_width); ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_next_frame_height(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_height()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_height); ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_next_frame_x_offset(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_x_offset()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_x_offset); ++ return (0); ++} ++ ++png_uint_32 PNGAPI ++png_get_next_frame_y_offset(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_y_offset()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_y_offset); ++ return (0); ++} ++ ++png_uint_16 PNGAPI ++png_get_next_frame_delay_num(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_delay_num()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_delay_num); ++ return (0); ++} ++ ++png_uint_16 PNGAPI ++png_get_next_frame_delay_den(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_delay_den()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_delay_den); ++ return (0); ++} ++ ++png_byte PNGAPI ++png_get_next_frame_dispose_op(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_dispose_op()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_dispose_op); ++ return (0); ++} ++ ++png_byte PNGAPI ++png_get_next_frame_blend_op(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_get_next_frame_blend_op()"); ++ ++ if (png_ptr != NULL && info_ptr != NULL) ++ return (info_ptr->next_frame_blend_op); ++ return (0); ++} ++ ++png_byte PNGAPI ++png_get_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_first_frame_is_hidden()"); ++ ++ if (png_ptr != NULL) ++ return (png_byte)(png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN); ++ ++ PNG_UNUSED(info_ptr) ++ ++ return 0; ++} ++#endif /* PNG_APNG_SUPPORTED */ + #endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */ +diff -Naru libpng-1.6.8.org/pnginfo.h libpng-1.6.8/pnginfo.h +--- libpng-1.6.8.org/pnginfo.h 2013-12-22 17:03:17.220988502 +0900 ++++ libpng-1.6.8/pnginfo.h 2013-12-22 17:03:17.288990684 +0900 +@@ -256,5 +256,18 @@ + png_bytepp row_pointers; /* the image bits */ + #endif + ++#ifdef PNG_APNG_SUPPORTED ++ png_uint_32 num_frames; /* including default image */ ++ png_uint_32 num_plays; ++ png_uint_32 next_frame_width; ++ png_uint_32 next_frame_height; ++ png_uint_32 next_frame_x_offset; ++ png_uint_32 next_frame_y_offset; ++ png_uint_16 next_frame_delay_num; ++ png_uint_16 next_frame_delay_den; ++ png_byte next_frame_dispose_op; ++ png_byte next_frame_blend_op; ++#endif ++ + }; + #endif /* PNGINFO_H */ +diff -Naru libpng-1.6.8.org/pngpread.c libpng-1.6.8/pngpread.c +--- libpng-1.6.8.org/pngpread.c 2013-12-22 17:03:17.221988534 +0900 ++++ libpng-1.6.8/pngpread.c 2013-12-22 17:03:17.288990684 +0900 +@@ -217,6 +217,109 @@ + + chunk_name = png_ptr->chunk_name; + ++#ifdef PNG_READ_APNG_SUPPORTED ++ if (png_ptr->num_frames_read > 0 && ++ png_ptr->num_frames_read < info_ptr->num_frames) ++ { ++ if (chunk_name == png_IDAT) ++ { ++ /* Discard trailing IDATs for the first frame */ ++ if (png_ptr->mode & PNG_HAVE_fcTL || png_ptr->num_frames_read > 1) ++ png_error(png_ptr, "out of place IDAT"); ++ ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ ++ png_push_crc_skip(png_ptr, png_ptr->push_length); ++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; ++ return; ++ } ++ else if (chunk_name == png_fdAT) ++ { ++ if (png_ptr->buffer_size < 4) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ ++ png_ensure_sequence_number(png_ptr, 4); ++ ++ if (!(png_ptr->mode & PNG_HAVE_fcTL)) ++ { ++ /* Discard trailing fdATs for frames other than the first */ ++ if (png_ptr->num_frames_read < 2) ++ png_error(png_ptr, "out of place fdAT"); ++ ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ ++ png_push_crc_skip(png_ptr, png_ptr->push_length); ++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; ++ return; ++ } ++ ++ else ++ { ++ /* frame data follows */ ++ png_ptr->idat_size = png_ptr->push_length - 4; ++ png_ptr->mode |= PNG_HAVE_IDAT; ++ png_ptr->process_mode = PNG_READ_IDAT_MODE; ++ ++ return; ++ } ++ } ++ ++ else if (chunk_name == png_fcTL) ++ { ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ ++ png_read_reset(png_ptr); ++ png_ptr->mode &= ~PNG_HAVE_fcTL; ++ ++ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length); ++ ++ if (!(png_ptr->mode & PNG_HAVE_fcTL)) ++ png_error(png_ptr, "missing required fcTL chunk"); ++ ++ png_read_reinit(png_ptr, info_ptr); ++ png_progressive_read_reset(png_ptr); ++ ++ if (png_ptr->frame_info_fn != NULL) ++ (*(png_ptr->frame_info_fn))(png_ptr, png_ptr->num_frames_read); ++ ++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; ++ ++ return; ++ } ++ ++ else ++ { ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ png_warning(png_ptr, "Skipped (ignored) a chunk " ++ "between APNG chunks"); ++ png_push_crc_skip(png_ptr, png_ptr->push_length); ++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; ++ return; ++ } ++ ++ return; ++ } ++#endif /* PNG_READ_APNG_SUPPORTED */ ++ + if (chunk_name == png_IDAT) + { + if (png_ptr->mode & PNG_AFTER_IDAT) +@@ -299,6 +402,9 @@ + + else if (chunk_name == png_IDAT) + { ++#ifdef PNG_READ_APNG_SUPPORTED ++ png_have_info(png_ptr, info_ptr); ++#endif + png_ptr->idat_size = png_ptr->push_length; + png_ptr->process_mode = PNG_READ_IDAT_MODE; + png_push_have_info(png_ptr, info_ptr); +@@ -529,6 +635,30 @@ + png_handle_iTXt(png_ptr, info_ptr, png_ptr->push_length); + } + #endif ++#ifdef PNG_READ_APNG_SUPPORTED ++ else if (chunk_name == png_acTL) ++ { ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ ++ png_handle_acTL(png_ptr, info_ptr, png_ptr->push_length); ++ } ++ ++ else if (chunk_name == png_fcTL) ++ { ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ ++ png_handle_fcTL(png_ptr, info_ptr, png_ptr->push_length); ++ } ++ ++#endif /* PNG_READ_APNG_SUPPORTED */ + + else + { +@@ -731,7 +861,11 @@ + png_byte chunk_tag[4]; + + /* TODO: this code can be commoned up with the same code in push_read */ ++#ifdef PNG_READ_APNG_SUPPORTED ++ if (png_ptr->buffer_size < 12) ++#else + if (png_ptr->buffer_size < 8) ++#endif + { + png_push_save_buffer(png_ptr); + return; +@@ -744,17 +878,64 @@ + png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + ++#ifdef PNG_READ_APNG_SUPPORTED ++ if (png_ptr->chunk_name != png_fdAT && png_ptr->num_frames_read > 0) ++ { ++ if (png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) ++ { ++ png_ptr->process_mode = PNG_READ_CHUNK_MODE; ++ if (png_ptr->frame_end_fn != NULL) ++ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read); ++ png_ptr->num_frames_read++; ++ return; ++ } ++ else ++ { ++ if (png_ptr->chunk_name == png_IEND) ++ png_error(png_ptr, "Not enough image data"); ++ if (png_ptr->push_length + 4 > png_ptr->buffer_size) ++ { ++ png_push_save_buffer(png_ptr); ++ return; ++ } ++ png_warning(png_ptr, "Skipping (ignoring) a chunk between " ++ "APNG chunks"); ++ png_crc_finish(png_ptr, png_ptr->push_length); ++ png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; ++ return; ++ } ++ } ++ else ++#endif ++#ifdef PNG_READ_APNG_SUPPORTED ++ if (png_ptr->chunk_name != png_IDAT && png_ptr->num_frames_read == 0) ++#else + if (png_ptr->chunk_name != png_IDAT) ++#endif + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + + if (!(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + png_error(png_ptr, "Not enough compressed data"); + ++#ifdef PNG_READ_APNG_SUPPORTED ++ if (png_ptr->frame_end_fn != NULL) ++ (*(png_ptr->frame_end_fn))(png_ptr, png_ptr->num_frames_read); ++ png_ptr->num_frames_read++; ++#endif ++ + return; + } + + png_ptr->idat_size = png_ptr->push_length; ++ ++#ifdef PNG_READ_APNG_SUPPORTED ++ if (png_ptr->num_frames_read > 0) ++ { ++ png_ensure_sequence_number(png_ptr, 4); ++ png_ptr->idat_size -= 4; ++ } ++#endif + } + + if (png_ptr->idat_size && png_ptr->save_buffer_size) +@@ -832,6 +1013,15 @@ + if (!(buffer_length > 0) || buffer == NULL) + png_error(png_ptr, "No IDAT data (internal error)"); + ++#ifdef PNG_READ_APNG_SUPPORTED ++ /* If the app is not APNG-aware, decode only the first frame */ ++ if (!(png_ptr->apng_flags & PNG_APNG_APP) && png_ptr->num_frames_read > 0) ++ { ++ png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; ++ return; ++ } ++#endif ++ + /* This routine must process all the data it has been given + * before returning, calling the row callback as required to + * handle the uncompressed results. +@@ -1280,6 +1470,18 @@ + png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); + } + ++#ifdef PNG_READ_APNG_SUPPORTED ++void PNGAPI ++png_set_progressive_frame_fn(png_structp png_ptr, ++ png_progressive_frame_ptr frame_info_fn, ++ png_progressive_frame_ptr frame_end_fn) ++{ ++ png_ptr->frame_info_fn = frame_info_fn; ++ png_ptr->frame_end_fn = frame_end_fn; ++ png_ptr->apng_flags |= PNG_APNG_APP; ++} ++#endif ++ + png_voidp PNGAPI + png_get_progressive_ptr(png_const_structrp png_ptr) + { +diff -Naru libpng-1.6.8.org/pngpriv.h libpng-1.6.8/pngpriv.h +--- libpng-1.6.8.org/pngpriv.h 2013-12-22 17:03:17.221988534 +0900 ++++ libpng-1.6.8/pngpriv.h 2013-12-22 17:03:17.289990716 +0900 +@@ -550,6 +550,10 @@ + #define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */ + /* 0x4000 (unused) */ + #define PNG_IS_READ_STRUCT 0x8000 /* Else is a write struct */ ++#ifdef PNG_APNG_SUPPORTED ++#define PNG_HAVE_acTL 0x10000 ++#define PNG_HAVE_fcTL 0x20000 ++#endif + + /* Flags for the transformations the PNG library does on the image data */ + #define PNG_BGR 0x0001 +@@ -771,6 +775,16 @@ + #define png_tRNS PNG_U32(116, 82, 78, 83) + #define png_zTXt PNG_U32(122, 84, 88, 116) + ++#ifdef PNG_APNG_SUPPORTED ++#define png_acTL PNG_U32( 97, 99, 84, 76) ++#define png_fcTL PNG_U32(102, 99, 84, 76) ++#define png_fdAT PNG_U32(102, 100, 65, 84) ++ ++/* For png_struct.apng_flags: */ ++#define PNG_FIRST_FRAME_HIDDEN 0x0001 ++#define PNG_APNG_APP 0x0002 ++#endif ++ + /* The following will work on (signed char*) strings, whereas the get_uint_32 + * macro will fail on top-bit-set values because of the sign extension. + */ +@@ -1583,6 +1597,47 @@ + */ + #endif + ++#ifdef PNG_APNG_SUPPORTED ++PNG_INTERNAL_FUNCTION(void,png_ensure_fcTL_is_valid,(png_structp png_ptr, ++ png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, ++ png_byte dispose_op, png_byte blend_op), PNG_EMPTY); ++ ++#ifdef PNG_READ_APNG_SUPPORTED ++PNG_INTERNAL_FUNCTION(void,png_handle_acTL,(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 length),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_handle_fcTL,(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 length),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_handle_fdAT,(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 length),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_have_info,(png_structp png_ptr, png_infop info_ptr),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_ensure_sequence_number,(png_structp png_ptr, ++ png_uint_32 length),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_read_reset,(png_structp png_ptr),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_read_reinit,(png_structp png_ptr, ++ png_infop info_ptr),PNG_EMPTY); ++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED ++PNG_INTERNAL_FUNCTION(void,png_progressive_read_reset,(png_structp png_ptr),PNG_EMPTY); ++#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ ++#endif /* PNG_READ_APNG_SUPPORTED */ ++ ++#ifdef PNG_WRITE_APNG_SUPPORTED ++PNG_INTERNAL_FUNCTION(void,png_write_acTL,(png_structp png_ptr, ++ png_uint_32 num_frames, png_uint_32 num_plays),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_write_fcTL,(png_structp png_ptr, ++ png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, ++ png_byte dispose_op, png_byte blend_op),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_write_fdAT,(png_structp png_ptr, ++ png_const_bytep data, png_size_t length),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_write_reset,(png_structp png_ptr),PNG_EMPTY); ++PNG_INTERNAL_FUNCTION(void,png_write_reinit,(png_structp png_ptr, ++ png_infop info_ptr, png_uint_32 width, png_uint_32 height),PNG_EMPTY); ++#endif /* PNG_WRITE_APNG_SUPPORTED */ ++#endif /* PNG_APNG_SUPPORTED */ ++ + /* Added at libpng version 1.4.0 */ + #ifdef PNG_COLORSPACE_SUPPORTED + /* These internal functions are for maintaining the colorspace structure within +diff -Naru libpng-1.6.8.org/pngread.c libpng-1.6.8/pngread.c +--- libpng-1.6.8.org/pngread.c 2013-12-22 17:03:17.222988566 +0900 ++++ libpng-1.6.8/pngread.c 2013-12-22 17:03:17.290990748 +0900 +@@ -158,6 +158,9 @@ + + else if (chunk_name == png_IDAT) + { ++#ifdef PNG_READ_APNG_SUPPORTED ++ png_have_info(png_ptr, info_ptr); ++#endif + png_ptr->idat_size = length; + break; + } +@@ -247,6 +250,17 @@ + png_handle_iTXt(png_ptr, info_ptr, length); + #endif + ++#ifdef PNG_READ_APNG_SUPPORTED ++ else if (chunk_name == png_acTL) ++ png_handle_acTL(png_ptr, info_ptr, length); ++ ++ else if (chunk_name == png_fcTL) ++ png_handle_fcTL(png_ptr, info_ptr, length); ++ ++ else if (chunk_name == png_fdAT) ++ png_handle_fdAT(png_ptr, info_ptr, length); ++#endif ++ + else + png_handle_unknown(png_ptr, info_ptr, length, + PNG_HANDLE_CHUNK_AS_DEFAULT); +@@ -254,6 +268,72 @@ + } + #endif /* PNG_SEQUENTIAL_READ_SUPPORTED */ + ++#ifdef PNG_READ_APNG_SUPPORTED ++void PNGAPI ++png_read_frame_head(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_byte have_chunk_after_DAT; /* after IDAT or after fdAT */ ++ ++ png_debug(0, "Reading frame head"); ++ ++ if (!(png_ptr->mode & PNG_HAVE_acTL)) ++ png_error(png_ptr, "attempt to png_read_frame_head() but " ++ "no acTL present"); ++ ++ /* do nothing for the main IDAT */ ++ if (png_ptr->num_frames_read == 0) ++ return; ++ ++ png_read_reset(png_ptr); ++ png_ptr->flags &= ~PNG_FLAG_ROW_INIT; ++ png_ptr->mode &= ~PNG_HAVE_fcTL; ++ ++ have_chunk_after_DAT = 0; ++ for (;;) ++ { ++ png_uint_32 length = png_read_chunk_header(png_ptr); ++ ++ if (png_ptr->chunk_name == png_IDAT) ++ { ++ /* discard trailing IDATs for the first frame */ ++ if (have_chunk_after_DAT || png_ptr->num_frames_read > 1) ++ png_error(png_ptr, "png_read_frame_head(): out of place IDAT"); ++ png_crc_finish(png_ptr, length); ++ } ++ ++ else if (png_ptr->chunk_name == png_fcTL) ++ { ++ png_handle_fcTL(png_ptr, info_ptr, length); ++ have_chunk_after_DAT = 1; ++ } ++ ++ else if (png_ptr->chunk_name == png_fdAT) ++ { ++ png_ensure_sequence_number(png_ptr, length); ++ ++ /* discard trailing fdATs for frames other than the first */ ++ if (!have_chunk_after_DAT && png_ptr->num_frames_read > 1) ++ png_crc_finish(png_ptr, length - 4); ++ else if(png_ptr->mode & PNG_HAVE_fcTL) ++ { ++ png_ptr->idat_size = length - 4; ++ png_ptr->mode |= PNG_HAVE_IDAT; ++ ++ break; ++ } ++ else ++ png_error(png_ptr, "png_read_frame_head(): out of place fdAT"); ++ } ++ else ++ { ++ png_warning(png_ptr, "Skipped (ignored) a chunk " ++ "between APNG chunks"); ++ png_crc_finish(png_ptr, length); ++ } ++ } ++} ++#endif /* PNG_READ_APNG_SUPPORTED */ ++ + /* Optional call to update the users info_ptr structure */ + void PNGAPI + png_read_update_info(png_structrp png_ptr, png_inforp info_ptr) +diff -Naru libpng-1.6.8.org/pngrutil.c libpng-1.6.8/pngrutil.c +--- libpng-1.6.8.org/pngrutil.c 2013-12-22 17:03:17.224988631 +0900 ++++ libpng-1.6.8/pngrutil.c 2013-12-22 17:03:17.291990780 +0900 +@@ -826,6 +826,11 @@ + filter_type = buf[11]; + interlace_type = buf[12]; + ++#ifdef PNG_READ_APNG_SUPPORTED ++ png_ptr->first_frame_width = width; ++ png_ptr->first_frame_height = height; ++#endif ++ + /* Set internal variables */ + png_ptr->width = width; + png_ptr->height = height; +@@ -2700,6 +2705,179 @@ + } + #endif + ++#ifdef PNG_READ_APNG_SUPPORTED ++void /* PRIVATE */ ++png_handle_acTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ++{ ++ png_byte data[8]; ++ png_uint_32 num_frames; ++ png_uint_32 num_plays; ++ png_uint_32 didSet; ++ ++ png_debug(1, "in png_handle_acTL"); ++ ++ if (!(png_ptr->mode & PNG_HAVE_IHDR)) ++ { ++ png_error(png_ptr, "Missing IHDR before acTL"); ++ } ++ else if (png_ptr->mode & PNG_HAVE_IDAT) ++ { ++ png_warning(png_ptr, "Invalid acTL after IDAT skipped"); ++ png_crc_finish(png_ptr, length); ++ return; ++ } ++ else if (png_ptr->mode & PNG_HAVE_acTL) ++ { ++ png_warning(png_ptr, "Duplicate acTL skipped"); ++ png_crc_finish(png_ptr, length); ++ return; ++ } ++ else if (length != 8) ++ { ++ png_warning(png_ptr, "acTL with invalid length skipped"); ++ png_crc_finish(png_ptr, length); ++ return; ++ } ++ ++ png_crc_read(png_ptr, data, 8); ++ png_crc_finish(png_ptr, 0); ++ ++ num_frames = png_get_uint_31(png_ptr, data); ++ num_plays = png_get_uint_31(png_ptr, data + 4); ++ ++ /* the set function will do error checking on num_frames */ ++ didSet = png_set_acTL(png_ptr, info_ptr, num_frames, num_plays); ++ if(didSet) ++ png_ptr->mode |= PNG_HAVE_acTL; ++} ++ ++void /* PRIVATE */ ++png_handle_fcTL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ++{ ++ png_byte data[22]; ++ png_uint_32 width; ++ png_uint_32 height; ++ png_uint_32 x_offset; ++ png_uint_32 y_offset; ++ png_uint_16 delay_num; ++ png_uint_16 delay_den; ++ png_byte dispose_op; ++ png_byte blend_op; ++ ++ png_debug(1, "in png_handle_fcTL"); ++ ++ png_ensure_sequence_number(png_ptr, length); ++ ++ if (!(png_ptr->mode & PNG_HAVE_IHDR)) ++ { ++ png_error(png_ptr, "Missing IHDR before fcTL"); ++ } ++ else if (png_ptr->mode & PNG_HAVE_IDAT) ++ { ++ /* for any frames other then the first this message may be misleading, ++ * but correct. PNG_HAVE_IDAT is unset before the frame head is read ++ * i can't think of a better message */ ++ png_warning(png_ptr, "Invalid fcTL after IDAT skipped"); ++ png_crc_finish(png_ptr, length-4); ++ return; ++ } ++ else if (png_ptr->mode & PNG_HAVE_fcTL) ++ { ++ png_warning(png_ptr, "Duplicate fcTL within one frame skipped"); ++ png_crc_finish(png_ptr, length-4); ++ return; ++ } ++ else if (length != 26) ++ { ++ png_warning(png_ptr, "fcTL with invalid length skipped"); ++ png_crc_finish(png_ptr, length-4); ++ return; ++ } ++ ++ png_crc_read(png_ptr, data, 22); ++ png_crc_finish(png_ptr, 0); ++ ++ width = png_get_uint_31(png_ptr, data); ++ height = png_get_uint_31(png_ptr, data + 4); ++ x_offset = png_get_uint_31(png_ptr, data + 8); ++ y_offset = png_get_uint_31(png_ptr, data + 12); ++ delay_num = png_get_uint_16(data + 16); ++ delay_den = png_get_uint_16(data + 18); ++ dispose_op = data[20]; ++ blend_op = data[21]; ++ ++ if (png_ptr->num_frames_read == 0 && (x_offset != 0 || y_offset != 0)) ++ { ++ png_warning(png_ptr, "fcTL for the first frame must have zero offset"); ++ return; ++ } ++ ++ if (info_ptr != NULL) ++ { ++ if (png_ptr->num_frames_read == 0 && ++ (width != info_ptr->width || height != info_ptr->height)) ++ { ++ png_warning(png_ptr, "size in first frame's fcTL must match " ++ "the size in IHDR"); ++ return; ++ } ++ ++ /* The set function will do more error checking */ ++ png_set_next_frame_fcTL(png_ptr, info_ptr, width, height, ++ x_offset, y_offset, delay_num, delay_den, ++ dispose_op, blend_op); ++ ++ png_read_reinit(png_ptr, info_ptr); ++ ++ png_ptr->mode |= PNG_HAVE_fcTL; ++ } ++} ++ ++void /* PRIVATE */ ++png_have_info(png_structp png_ptr, png_infop info_ptr) ++{ ++ if((info_ptr->valid & PNG_INFO_acTL) && !(info_ptr->valid & PNG_INFO_fcTL)) ++ { ++ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN; ++ info_ptr->num_frames++; ++ } ++} ++ ++void /* PRIVATE */ ++png_handle_fdAT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length) ++{ ++ png_ensure_sequence_number(png_ptr, length); ++ ++ /* This function is only called from png_read_end(), png_read_info(), ++ * and png_push_read_chunk() which means that: ++ * - the user doesn't want to read this frame ++ * - or this is an out-of-place fdAT ++ * in either case it is safe to ignore the chunk with a warning */ ++ png_warning(png_ptr, "ignoring fdAT chunk"); ++ png_crc_finish(png_ptr, length - 4); ++ PNG_UNUSED(info_ptr) ++} ++ ++void /* PRIVATE */ ++png_ensure_sequence_number(png_structp png_ptr, png_uint_32 length) ++{ ++ png_byte data[4]; ++ png_uint_32 sequence_number; ++ ++ if (length < 4) ++ png_error(png_ptr, "invalid fcTL or fdAT chunk found"); ++ ++ png_crc_read(png_ptr, data, 4); ++ sequence_number = png_get_uint_31(png_ptr, data); ++ ++ if (sequence_number != png_ptr->next_seq_num) ++ png_error(png_ptr, "fcTL or fdAT chunk with out-of-order sequence " ++ "number found"); ++ ++ png_ptr->next_seq_num++; ++} ++#endif /* PNG_READ_APNG_SUPPORTED */ ++ + #ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED + /* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */ + static int +@@ -3956,7 +4134,38 @@ + { + uInt avail_in; + png_bytep buffer; ++#ifdef PNG_READ_APNG_SUPPORTED ++ png_uint_32 bytes_to_skip = 0; ++ ++ while (png_ptr->idat_size == 0 || bytes_to_skip != 0) ++ { ++ png_crc_finish(png_ptr, bytes_to_skip); ++ bytes_to_skip = 0; + ++ png_ptr->idat_size = png_read_chunk_header(png_ptr); ++ if (png_ptr->num_frames_read == 0) ++ { ++ if (png_ptr->chunk_name != png_IDAT) ++ png_error(png_ptr, "Not enough image data"); ++ } ++ else ++ { ++ if (png_ptr->chunk_name == png_IEND) ++ png_error(png_ptr, "Not enough image data"); ++ if (png_ptr->chunk_name != png_fdAT) ++ { ++ png_warning(png_ptr, "Skipped (ignored) a chunk " ++ "between APNG chunks"); ++ bytes_to_skip = png_ptr->idat_size; ++ continue; ++ } ++ ++ png_ensure_sequence_number(png_ptr, png_ptr->idat_size); ++ ++ png_ptr->idat_size -= 4; ++ } ++ } ++#else + while (png_ptr->idat_size == 0) + { + png_crc_finish(png_ptr, 0); +@@ -3968,7 +4177,7 @@ + if (png_ptr->chunk_name != png_IDAT) + png_error(png_ptr, "Not enough image data"); + } +- ++#endif /* PNG_READ_APNG_SUPPORTED */ + avail_in = png_ptr->IDAT_read_size; + + if (avail_in > png_ptr->idat_size) +@@ -4031,6 +4240,9 @@ + + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; ++#ifdef PNG_READ_APNG_SUPPORTED ++ png_ptr->num_frames_read++; ++#endif + + if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0) + png_chunk_benign_error(png_ptr, "Extra compressed data"); +@@ -4476,4 +4688,80 @@ + + png_ptr->flags |= PNG_FLAG_ROW_INIT; + } ++ ++#ifdef PNG_READ_APNG_SUPPORTED ++/* This function is to be called after the main IDAT set has been read and ++ * before a new IDAT is read. It resets some parts of png_ptr ++ * to make them usable by the read functions again */ ++void /* PRIVATE */ ++png_read_reset(png_structp png_ptr) ++{ ++ png_ptr->mode &= ~PNG_HAVE_IDAT; ++ png_ptr->mode &= ~PNG_AFTER_IDAT; ++ png_ptr->row_number = 0; ++ png_ptr->pass = 0; ++} ++ ++void /* PRIVATE */ ++png_read_reinit(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_ptr->width = info_ptr->next_frame_width; ++ png_ptr->height = info_ptr->next_frame_height; ++ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,png_ptr->width); ++ png_ptr->info_rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, ++ png_ptr->width); ++ if (png_ptr->prev_row) ++ memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); ++} ++ ++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED ++/* same as png_read_reset() but for the progressive reader */ ++void /* PRIVATE */ ++png_progressive_read_reset(png_structp png_ptr) ++{ ++#ifdef PNG_READ_INTERLACING_SUPPORTED ++ /* Arrays to facilitate easy interlacing - use pass (0 - 6) as index */ ++ ++ /* Start of interlace block */ ++ const int png_pass_start[] = {0, 4, 0, 2, 0, 1, 0}; ++ ++ /* Offset to next interlace block */ ++ const int png_pass_inc[] = {8, 8, 4, 4, 2, 2, 1}; ++ ++ /* Start of interlace block in the y direction */ ++ const int png_pass_ystart[] = {0, 0, 4, 0, 2, 0, 1}; ++ ++ /* Offset to next interlace block in the y direction */ ++ const int png_pass_yinc[] = {8, 8, 8, 4, 4, 2, 2}; ++ ++ if (png_ptr->interlaced) ++ { ++ if (!(png_ptr->transformations & PNG_INTERLACE)) ++ png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - ++ png_pass_ystart[0]) / png_pass_yinc[0]; ++ else ++ png_ptr->num_rows = png_ptr->height; ++ ++ png_ptr->iwidth = (png_ptr->width + ++ png_pass_inc[png_ptr->pass] - 1 - ++ png_pass_start[png_ptr->pass]) / ++ png_pass_inc[png_ptr->pass]; ++ } ++ else ++#endif /* PNG_READ_INTERLACING_SUPPORTED */ ++ { ++ png_ptr->num_rows = png_ptr->height; ++ png_ptr->iwidth = png_ptr->width; ++ } ++ png_ptr->flags &= ~PNG_FLAG_ZSTREAM_ENDED; ++ if (inflateReset(&(png_ptr->zstream)) != Z_OK) ++ png_error(png_ptr, "inflateReset failed"); ++ png_ptr->zstream.avail_in = 0; ++ png_ptr->zstream.next_in = 0; ++ png_ptr->zstream.next_out = png_ptr->row_buf; ++ png_ptr->zstream.avail_out = (uInt)PNG_ROWBYTES(png_ptr->pixel_depth, ++ png_ptr->iwidth) + 1; ++} ++#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ ++#endif /* PNG_READ_APNG_SUPPORTED */ + #endif /* PNG_READ_SUPPORTED */ +diff -Naru libpng-1.6.8.org/pngset.c libpng-1.6.8/pngset.c +--- libpng-1.6.8.org/pngset.c 2013-12-22 17:03:17.224988631 +0900 ++++ libpng-1.6.8/pngset.c 2013-12-22 17:03:17.292990812 +0900 +@@ -239,6 +239,11 @@ + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); + + info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); ++ ++#ifdef PNG_APNG_SUPPORTED ++ /* for non-animated png. this may be overwritten from an acTL chunk later */ ++ info_ptr->num_frames = 1; ++#endif + } + + #ifdef PNG_oFFs_SUPPORTED +@@ -1065,6 +1070,147 @@ + } + #endif /* PNG_sPLT_SUPPORTED */ + ++#ifdef PNG_APNG_SUPPORTED ++png_uint_32 PNGAPI ++png_set_acTL(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 num_frames, png_uint_32 num_plays) ++{ ++ png_debug1(1, "in %s storage function", "acTL"); ++ ++ if (png_ptr == NULL || info_ptr == NULL) ++ { ++ png_warning(png_ptr, ++ "Call to png_set_acTL() with NULL png_ptr " ++ "or info_ptr ignored"); ++ return (0); ++ } ++ if (num_frames == 0) ++ { ++ png_warning(png_ptr, ++ "Ignoring attempt to set acTL with num_frames zero"); ++ return (0); ++ } ++ if (num_frames > PNG_UINT_31_MAX) ++ { ++ png_warning(png_ptr, ++ "Ignoring attempt to set acTL with num_frames > 2^31-1"); ++ return (0); ++ } ++ if (num_plays > PNG_UINT_31_MAX) ++ { ++ png_warning(png_ptr, ++ "Ignoring attempt to set acTL with num_plays " ++ "> 2^31-1"); ++ return (0); ++ } ++ ++ info_ptr->num_frames = num_frames; ++ info_ptr->num_plays = num_plays; ++ ++ info_ptr->valid |= PNG_INFO_acTL; ++ ++ return (1); ++} ++ ++/* delay_num and delay_den can hold any 16-bit values including zero */ ++png_uint_32 PNGAPI ++png_set_next_frame_fcTL(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, ++ png_byte dispose_op, png_byte blend_op) ++{ ++ png_debug1(1, "in %s storage function", "fcTL"); ++ ++ if (png_ptr == NULL || info_ptr == NULL) ++ { ++ png_warning(png_ptr, ++ "Call to png_set_fcTL() with NULL png_ptr or info_ptr " ++ "ignored"); ++ return (0); ++ } ++ ++ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset, ++ delay_num, delay_den, dispose_op, blend_op); ++ ++ if (blend_op == PNG_BLEND_OP_OVER) ++ { ++ if (!(png_ptr->color_type & PNG_COLOR_MASK_ALPHA) && ++ !(png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) ++ { ++ png_warning(png_ptr, "PNG_BLEND_OP_OVER is meaningless " ++ "and wasteful for opaque images, ignored"); ++ blend_op = PNG_BLEND_OP_SOURCE; ++ } ++ } ++ ++ info_ptr->next_frame_width = width; ++ info_ptr->next_frame_height = height; ++ info_ptr->next_frame_x_offset = x_offset; ++ info_ptr->next_frame_y_offset = y_offset; ++ info_ptr->next_frame_delay_num = delay_num; ++ info_ptr->next_frame_delay_den = delay_den; ++ info_ptr->next_frame_dispose_op = dispose_op; ++ info_ptr->next_frame_blend_op = blend_op; ++ ++ info_ptr->valid |= PNG_INFO_fcTL; ++ ++ return (1); ++} ++ ++void /* PRIVATE */ ++png_ensure_fcTL_is_valid(png_structp png_ptr, ++ png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, ++ png_byte dispose_op, png_byte blend_op) ++{ ++ if (width > PNG_UINT_31_MAX) ++ png_error(png_ptr, "invalid width in fcTL (> 2^31-1)"); ++ if (height > PNG_UINT_31_MAX) ++ png_error(png_ptr, "invalid height in fcTL (> 2^31-1)"); ++ if (x_offset > PNG_UINT_31_MAX) ++ png_error(png_ptr, "invalid x_offset in fcTL (> 2^31-1)"); ++ if (y_offset > PNG_UINT_31_MAX) ++ png_error(png_ptr, "invalid y_offset in fcTL (> 2^31-1)"); ++ if (width + x_offset > png_ptr->first_frame_width || ++ height + y_offset > png_ptr->first_frame_height) ++ png_error(png_ptr, "dimensions of a frame are greater than" ++ "the ones in IHDR"); ++ ++ if (dispose_op != PNG_DISPOSE_OP_NONE && ++ dispose_op != PNG_DISPOSE_OP_BACKGROUND && ++ dispose_op != PNG_DISPOSE_OP_PREVIOUS) ++ png_error(png_ptr, "invalid dispose_op in fcTL"); ++ ++ if (blend_op != PNG_BLEND_OP_SOURCE && ++ blend_op != PNG_BLEND_OP_OVER) ++ png_error(png_ptr, "invalid blend_op in fcTL"); ++ ++ PNG_UNUSED(delay_num) ++ PNG_UNUSED(delay_den) ++} ++ ++png_uint_32 PNGAPI ++png_set_first_frame_is_hidden(png_structp png_ptr, png_infop info_ptr, ++ png_byte is_hidden) ++{ ++ png_debug(1, "in png_first_frame_is_hidden()"); ++ ++ if (png_ptr == NULL) ++ return 0; ++ ++ if (is_hidden) ++ png_ptr->apng_flags |= PNG_FIRST_FRAME_HIDDEN; ++ else ++ png_ptr->apng_flags &= ~PNG_FIRST_FRAME_HIDDEN; ++ ++ PNG_UNUSED(info_ptr) ++ ++ return 1; ++} ++#endif /* PNG_APNG_SUPPORTED */ ++ + #ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + static png_byte + check_location(png_const_structrp png_ptr, int location) +diff -Naru libpng-1.6.8.org/pngstruct.h libpng-1.6.8/pngstruct.h +--- libpng-1.6.8.org/pngstruct.h 2013-12-22 17:03:17.224988631 +0900 ++++ libpng-1.6.8/pngstruct.h 2013-12-22 17:03:17.292990812 +0900 +@@ -409,6 +409,27 @@ + png_byte filter_type; + #endif + ++#ifdef PNG_APNG_SUPPORTED ++ png_uint_32 apng_flags; ++ png_uint_32 next_seq_num; /* next fcTL/fdAT chunk sequence number */ ++ png_uint_32 first_frame_width; ++ png_uint_32 first_frame_height; ++ ++#ifdef PNG_READ_APNG_SUPPORTED ++ png_uint_32 num_frames_read; /* incremented after all image data of */ ++ /* a frame is read */ ++#ifdef PNG_PROGRESSIVE_READ_SUPPORTED ++ png_progressive_frame_ptr frame_info_fn; /* frame info read callback */ ++ png_progressive_frame_ptr frame_end_fn; /* frame data read callback */ ++#endif ++#endif ++ ++#ifdef PNG_WRITE_APNG_SUPPORTED ++ png_uint_32 num_frames_to_write; ++ png_uint_32 num_frames_written; ++#endif ++#endif /* PNG_APNG_SUPPORTED */ ++ + /* New members added in libpng-1.2.0 */ + + /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +diff -Naru libpng-1.6.8.org/pngtest.c libpng-1.6.8/pngtest.c +--- libpng-1.6.8.org/pngtest.c 2013-12-22 17:03:17.224988631 +0900 ++++ libpng-1.6.8/pngtest.c 2013-12-22 17:03:17.292990812 +0900 +@@ -840,6 +840,10 @@ + png_uint_32 width, height; + int num_pass, pass; + int bit_depth, color_type; ++#ifdef PNG_APNG_SUPPORTED ++ png_uint_32 num_frames; ++ png_uint_32 num_plays; ++#endif + + row_buf = NULL; + error_parameters.file_name = inname; +@@ -1290,6 +1294,20 @@ + } + } + #endif ++#ifdef PNG_APNG_SUPPORTED ++ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL)) ++ { ++ if (png_get_acTL(read_ptr, read_info_ptr, &num_frames, &num_plays)) ++ { ++ png_byte is_hidden; ++ pngtest_debug2("Handling acTL chunks (frames %ld, plays %ld)", ++ num_frames, num_plays); ++ png_set_acTL(write_ptr, write_info_ptr, num_frames, num_plays); ++ is_hidden = png_get_first_frame_is_hidden(read_ptr, read_info_ptr); ++ png_set_first_frame_is_hidden(write_ptr, write_info_ptr, is_hidden); ++ } ++ } ++#endif + #ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + { + png_unknown_chunkp unknowns; +@@ -1355,6 +1373,89 @@ + t_misc += (t_stop - t_start); + t_start = t_stop; + #endif ++#ifdef PNG_APNG_SUPPORTED ++ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_acTL)) ++ { ++ png_uint_32 frame; ++ for (frame = 0; frame < num_frames; frame++) ++ { ++ png_uint_32 frame_width; ++ png_uint_32 frame_height; ++ png_uint_32 x_offset; ++ png_uint_32 y_offset; ++ png_uint_16 delay_num; ++ png_uint_16 delay_den; ++ png_byte dispose_op; ++ png_byte blend_op; ++ png_read_frame_head(read_ptr, read_info_ptr); ++ if (png_get_valid(read_ptr, read_info_ptr, PNG_INFO_fcTL)) ++ { ++ png_get_next_frame_fcTL(read_ptr, read_info_ptr, ++ &frame_width, &frame_height, ++ &x_offset, &y_offset, ++ &delay_num, &delay_den, ++ &dispose_op, &blend_op); ++ } ++ else ++ { ++ frame_width = width; ++ frame_height = height; ++ x_offset = 0; ++ y_offset = 0; ++ delay_num = 1; ++ delay_den = 1; ++ dispose_op = PNG_DISPOSE_OP_NONE; ++ blend_op = PNG_BLEND_OP_SOURCE; ++ } ++#ifdef PNG_WRITE_APNG_SUPPORTED ++ png_write_frame_head(write_ptr, write_info_ptr, (png_bytepp)&row_buf, ++ frame_width, frame_height, ++ x_offset, y_offset, ++ delay_num, delay_den, ++ dispose_op, blend_op); ++#endif ++ for (pass = 0; pass < num_pass; pass++) ++ { ++ pngtest_debug1("Writing row data for pass %d", pass); ++ for (y = 0; y < frame_height; y++) ++ { ++#ifndef SINGLE_ROWBUF_ALLOC ++ pngtest_debug2("Allocating row buffer (pass %d, y = %ld)...", pass, y); ++ row_buf = (png_bytep)png_malloc(read_ptr, ++ png_get_rowbytes(read_ptr, read_info_ptr)); ++ pngtest_debug2("0x%08lx (%ld bytes)", (unsigned long)row_buf, ++ png_get_rowbytes(read_ptr, read_info_ptr)); ++#endif /* !SINGLE_ROWBUF_ALLOC */ ++ png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1); ++ ++#ifdef PNG_WRITE_SUPPORTED ++#ifdef PNGTEST_TIMING ++ t_stop = (float)clock(); ++ t_decode += (t_stop - t_start); ++ t_start = t_stop; ++#endif ++ png_write_rows(write_ptr, (png_bytepp)&row_buf, 1); ++#ifdef PNGTEST_TIMING ++ t_stop = (float)clock(); ++ t_encode += (t_stop - t_start); ++ t_start = t_stop; ++#endif ++#endif /* PNG_WRITE_SUPPORTED */ ++ ++#ifndef SINGLE_ROWBUF_ALLOC ++ pngtest_debug2("Freeing row buffer (pass %d, y = %ld)", pass, y); ++ png_free(read_ptr, row_buf); ++ row_buf = NULL; ++#endif /* !SINGLE_ROWBUF_ALLOC */ ++ } ++ } ++#ifdef PNG_WRITE_APNG_SUPPORTED ++ png_write_frame_tail(write_ptr, write_info_ptr); ++#endif ++ } ++ } ++ else ++#endif + for (pass = 0; pass < num_pass; pass++) + { + pngtest_debug1("Writing row data for pass %d", pass); +diff -Naru libpng-1.6.8.org/pngwrite.c libpng-1.6.8/pngwrite.c +--- libpng-1.6.8.org/pngwrite.c 2013-12-22 17:03:17.225988663 +0900 ++++ libpng-1.6.8/pngwrite.c 2013-12-22 17:03:17.310991389 +0900 +@@ -127,6 +127,10 @@ + * application continues writing the PNG. So check the 'invalid' flag here + * too. + */ ++#ifdef PNG_WRITE_APNG_SUPPORTED ++ if (info_ptr->valid & PNG_INFO_acTL) ++ png_write_acTL(png_ptr, info_ptr->num_frames, info_ptr->num_plays); ++#endif + #ifdef PNG_GAMMA_SUPPORTED + # ifdef PNG_WRITE_gAMA_SUPPORTED + if (!(info_ptr->colorspace.flags & PNG_COLORSPACE_INVALID) && +@@ -357,6 +361,11 @@ + png_benign_error(png_ptr, "Wrote palette index exceeding num_palette"); + #endif + ++#ifdef PNG_WRITE_APNG_SUPPORTED ++ if (png_ptr->num_frames_written != png_ptr->num_frames_to_write) ++ png_error(png_ptr, "Not enough frames written"); ++#endif ++ + /* See if user wants us to write information chunks */ + if (info_ptr != NULL) + { +@@ -1560,6 +1569,43 @@ + } + #endif + ++#ifdef PNG_WRITE_APNG_SUPPORTED ++void PNGAPI ++png_write_frame_head(png_structp png_ptr, png_infop info_ptr, ++ png_bytepp row_pointers, png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, ++ png_byte blend_op) ++{ ++ png_debug(1, "in png_write_frame_head"); ++ ++ /* there is a chance this has been set after png_write_info was called, ++ * so it would be set but not written. is there a way to be sure? */ ++ if (!(info_ptr->valid & PNG_INFO_acTL)) ++ png_error(png_ptr, "png_write_frame_head(): acTL not set"); ++ ++ png_write_reset(png_ptr); ++ ++ png_write_reinit(png_ptr, info_ptr, width, height); ++ ++ if ( !(png_ptr->num_frames_written == 0 && ++ (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ) ) ++ png_write_fcTL(png_ptr, width, height, x_offset, y_offset, ++ delay_num, delay_den, dispose_op, blend_op); ++ ++ PNG_UNUSED(row_pointers) ++} ++ ++void PNGAPI ++png_write_frame_tail(png_structp png_ptr, png_infop info_ptr) ++{ ++ png_debug(1, "in png_write_frame_tail"); ++ ++ png_ptr->num_frames_written++; ++ ++ PNG_UNUSED(info_ptr) ++} ++#endif /* PNG_WRITE_APNG_SUPPORTED */ + + #ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED + #ifdef PNG_STDIO_SUPPORTED /* currently required for png_image_write_* */ +diff -Naru libpng-1.6.8.org/pngwutil.c libpng-1.6.8/pngwutil.c +--- libpng-1.6.8.org/pngwutil.c 2013-12-22 17:03:17.226988695 +0900 ++++ libpng-1.6.8/pngwutil.c 2013-12-22 17:03:17.311991421 +0900 +@@ -898,6 +898,11 @@ + /* Write the chunk */ + png_write_complete_chunk(png_ptr, png_IHDR, buf, (png_size_t)13); + ++#ifdef PNG_WRITE_APNG_SUPPORTED ++ png_ptr->first_frame_width = width; ++ png_ptr->first_frame_height = height; ++#endif ++ + if (!(png_ptr->do_filter)) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || +@@ -1076,7 +1081,14 @@ + optimize_cmf(data, png_image_size(png_ptr)); + # endif + ++# ifdef PNG_WRITE_APNG_SUPPORTED ++ if (png_ptr->num_frames_written == 0) ++# endif + png_write_complete_chunk(png_ptr, png_IDAT, data, size); ++# ifdef PNG_WRITE_APNG_SUPPORTED ++ else ++ png_write_fdAT(png_ptr, data, size); ++# endif /* PNG_WRITE_APNG_SUPPORTED */ + png_ptr->mode |= PNG_HAVE_IDAT; + + png_ptr->zstream.next_out = data; +@@ -1122,7 +1134,15 @@ + optimize_cmf(data, png_image_size(png_ptr)); + # endif + ++# ifdef PNG_WRITE_APNG_SUPPORTED ++ if (png_ptr->num_frames_written == 0) ++# endif + png_write_complete_chunk(png_ptr, png_IDAT, data, size); ++# ifdef PNG_WRITE_APNG_SUPPORTED ++ else ++ png_write_fdAT(png_ptr, data, size); ++# endif /* PNG_WRITE_APNG_SUPPORTED */ ++ + png_ptr->zstream.avail_out = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT; +@@ -1934,6 +1954,82 @@ + } + #endif + ++#ifdef PNG_WRITE_APNG_SUPPORTED ++void /* PRIVATE */ ++png_write_acTL(png_structp png_ptr, ++ png_uint_32 num_frames, png_uint_32 num_plays) ++{ ++ png_byte buf[8]; ++ ++ png_debug(1, "in png_write_acTL"); ++ ++ png_ptr->num_frames_to_write = num_frames; ++ ++ if (png_ptr->apng_flags & PNG_FIRST_FRAME_HIDDEN) ++ num_frames--; ++ ++ png_save_uint_32(buf, num_frames); ++ png_save_uint_32(buf + 4, num_plays); ++ ++ png_write_complete_chunk(png_ptr, png_acTL, buf, (png_size_t)8); ++} ++ ++void /* PRIVATE */ ++png_write_fcTL(png_structp png_ptr, png_uint_32 width, png_uint_32 height, ++ png_uint_32 x_offset, png_uint_32 y_offset, ++ png_uint_16 delay_num, png_uint_16 delay_den, png_byte dispose_op, ++ png_byte blend_op) ++{ ++ png_byte buf[26]; ++ ++ png_debug(1, "in png_write_fcTL"); ++ ++ if (png_ptr->num_frames_written == 0 && (x_offset != 0 || y_offset != 0)) ++ png_error(png_ptr, "x and/or y offset for the first frame aren't 0"); ++ if (png_ptr->num_frames_written == 0 && ++ (width != png_ptr->first_frame_width || ++ height != png_ptr->first_frame_height)) ++ png_error(png_ptr, "width and/or height in the first frame's fcTL " ++ "don't match the ones in IHDR"); ++ ++ /* more error checking */ ++ png_ensure_fcTL_is_valid(png_ptr, width, height, x_offset, y_offset, ++ delay_num, delay_den, dispose_op, blend_op); ++ ++ png_save_uint_32(buf, png_ptr->next_seq_num); ++ png_save_uint_32(buf + 4, width); ++ png_save_uint_32(buf + 8, height); ++ png_save_uint_32(buf + 12, x_offset); ++ png_save_uint_32(buf + 16, y_offset); ++ png_save_uint_16(buf + 20, delay_num); ++ png_save_uint_16(buf + 22, delay_den); ++ buf[24] = dispose_op; ++ buf[25] = blend_op; ++ ++ png_write_complete_chunk(png_ptr, png_fcTL, buf, (png_size_t)26); ++ ++ png_ptr->next_seq_num++; ++} ++ ++void /* PRIVATE */ ++png_write_fdAT(png_structp png_ptr, ++ png_const_bytep data, png_size_t length) ++{ ++ png_byte buf[4]; ++ ++ png_write_chunk_header(png_ptr, png_fdAT, (png_uint_32)(4 + length)); ++ ++ png_save_uint_32(buf, png_ptr->next_seq_num); ++ png_write_chunk_data(png_ptr, buf, 4); ++ ++ png_write_chunk_data(png_ptr, data, length); ++ ++ png_write_chunk_end(png_ptr); ++ ++ png_ptr->next_seq_num++; ++} ++#endif /* PNG_WRITE_APNG_SUPPORTED */ ++ + /* Initializes the row writing capability of libpng */ + void /* PRIVATE */ + png_write_start_row(png_structrp png_ptr) +@@ -3020,4 +3116,39 @@ + } + #endif + } ++ ++#ifdef PNG_WRITE_APNG_SUPPORTED ++void /* PRIVATE */ ++png_write_reset(png_structp png_ptr) ++{ ++ png_ptr->row_number = 0; ++ png_ptr->pass = 0; ++ png_ptr->mode &= ~PNG_HAVE_IDAT; ++} ++ ++void /* PRIVATE */ ++png_write_reinit(png_structp png_ptr, png_infop info_ptr, ++ png_uint_32 width, png_uint_32 height) ++{ ++ if (png_ptr->num_frames_written == 0 && ++ (width != png_ptr->first_frame_width || ++ height != png_ptr->first_frame_height)) ++ png_error(png_ptr, "width and/or height in the first frame's fcTL " ++ "don't match the ones in IHDR"); ++ if (width > png_ptr->first_frame_width || ++ height > png_ptr->first_frame_height) ++ png_error(png_ptr, "width and/or height for a frame greater than" ++ "the ones in IHDR"); ++ ++ png_set_IHDR(png_ptr, info_ptr, width, height, ++ info_ptr->bit_depth, info_ptr->color_type, ++ info_ptr->interlace_type, info_ptr->compression_type, ++ info_ptr->filter_type); ++ ++ png_ptr->width = width; ++ png_ptr->height = height; ++ png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width); ++ png_ptr->usr_width = png_ptr->width; ++} ++#endif /* PNG_WRITE_APNG_SUPPORTED */ + #endif /* PNG_WRITE_SUPPORTED */ +diff -Naru libpng-1.6.8.org/scripts/symbols.def libpng-1.6.8/scripts/symbols.def +--- libpng-1.6.8.org/scripts/symbols.def 2013-12-22 17:03:17.232988887 +0900 ++++ libpng-1.6.8/scripts/symbols.def 2013-12-22 17:03:17.317991614 +0900 +@@ -249,3 +249,23 @@ + png_set_check_for_invalid_index @242 + png_get_palette_max @243 + png_set_option @244 ++ png_get_acTL @245 ++ png_set_acTL @246 ++ png_get_num_frames @247 ++ png_get_num_plays @248 ++ png_get_next_frame_fcTL @249 ++ png_set_next_frame_fcTL @250 ++ png_get_next_frame_width @251 ++ png_get_next_frame_height @252 ++ png_get_next_frame_x_offset @253 ++ png_get_next_frame_y_offset @254 ++ png_get_next_frame_delay_num @255 ++ png_get_next_frame_delay_den @256 ++ png_get_next_frame_dispose_op @257 ++ png_get_next_frame_blend_op @258 ++ png_get_first_frame_is_hidden @259 ++ png_set_first_frame_is_hidden @260 ++ png_read_frame_head @261 ++ png_set_progressive_frame_fn @262 ++ png_write_frame_head @263 ++ png_write_frame_tail @264 diff --git a/package/nspr/Makefile b/package/nspr/Makefile index eaa679d95..33063d67f 100644 --- a/package/nspr/Makefile +++ b/package/nspr/Makefile @@ -4,9 +4,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= nspr -PKG_VERSION:= 4.9.6 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 62b1e9d376d503d972f90c3c0031d879 +PKG_VERSION:= 4.10.2 +PKG_RELEASE:= 1 +PKG_MD5SUM:= f0d254da0b2b870d9a5fa094e879d4b8 PKG_DESCR:= Netscape Portable Runtime library PKG_SECTION:= libs PKG_URL:= http://www.mozilla.org/projects/nspr/ @@ -15,7 +15,7 @@ PKG_OPTS:= dev PKG_ARCH_DEPENDS:= !cris -WRKSRC= ${WRKDIST}/mozilla/nsprpub +WRKSRC= ${WRKDIST}/nspr include $(TOPDIR)/mk/package.mk diff --git a/package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in b/package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in deleted file mode 100644 index 9e925158b..000000000 --- a/package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in +++ /dev/null @@ -1,11 +0,0 @@ ---- nspr-4.9.5.orig/mozilla/nsprpub/config/Makefile.in 2012-11-14 00:17:57.000000000 +0100 -+++ nspr-4.9.5/mozilla/nsprpub/config/Makefile.in 2013-02-27 16:29:38.000000000 +0100 -@@ -113,7 +113,7 @@ endif - - $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX) - @$(MAKE_OBJDIR) -- $(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@ -+ $(CC_FOR_BUILD) $(HOSTCFLAGS) $< $(HOSTLDFLAGS) $(XLDOPTS) $(OUTOPTION)$@ - - install:: nspr.m4 - $(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal diff --git a/package/nspr/patches/patch-mozilla_nsprpub_configure b/package/nspr/patches/patch-mozilla_nsprpub_configure deleted file mode 100644 index cfaa795ed..000000000 --- a/package/nspr/patches/patch-mozilla_nsprpub_configure +++ /dev/null @@ -1,11 +0,0 @@ ---- nspr-4.9.6.orig/mozilla/nsprpub/configure 2013-03-14 18:34:31.000000000 +0100 -+++ nspr-4.9.6/mozilla/nsprpub/configure 2013-10-21 15:29:36.000000000 +0200 -@@ -2855,7 +2855,7 @@ esac - if test "$cross_compiling" = "yes"; then - CROSS_COMPILE=1 - else -- CROSS_COMPILE= -+ CROSS_COMPILE=1 - fi - - echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6 diff --git a/package/nspr/patches/patch-mozilla_nsprpub_pr_src_misc_prnetdb_c b/package/nspr/patches/patch-mozilla_nsprpub_pr_src_misc_prnetdb_c deleted file mode 100644 index 99ecc22dc..000000000 --- a/package/nspr/patches/patch-mozilla_nsprpub_pr_src_misc_prnetdb_c +++ /dev/null @@ -1,16 +0,0 @@ -* patch from alpinelinux - ---- nspr-4.9.6.orig/mozilla/nsprpub/pr/src/misc/prnetdb.c 2012-09-28 16:33:48.000000000 +0200 -+++ nspr-4.9.6/mozilla/nsprpub/pr/src/misc/prnetdb.c 2013-10-21 18:07:57.000000000 +0200 -@@ -61,10 +61,7 @@ PRLock *_pr_dnsLock = NULL; - #define _PR_HAVE_GETPROTO_R_POINTER - #endif - --#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) \ -- || (defined(LINUX) && defined(_REENTRANT) \ -- && !(defined(__GLIBC__) && __GLIBC__ >= 2) \ -- && !defined(ANDROID)) -+#if defined(SOLARIS) || (defined(BSDI) && defined(_REENTRANT)) - #define _PR_HAVE_GETPROTO_R - #define _PR_HAVE_GETPROTO_R_POINTER - #endif -- cgit v1.2.3 From 4bbe6b30b24c99257a43523fbe4e3be935793fa5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 4 Jan 2014 22:23:12 +0100 Subject: add patch dir --- package/monit/patches/patch-src_process_sysdep_LINUX_c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 package/monit/patches/patch-src_process_sysdep_LINUX_c (limited to 'package') diff --git a/package/monit/patches/patch-src_process_sysdep_LINUX_c b/package/monit/patches/patch-src_process_sysdep_LINUX_c new file mode 100644 index 000000000..a2781dd91 --- /dev/null +++ b/package/monit/patches/patch-src_process_sysdep_LINUX_c @@ -0,0 +1,11 @@ +--- monit-5.6.orig/src/process/sysdep_LINUX.c 2012-05-10 22:52:38.000000000 +0200 ++++ monit-5.6/src/process/sysdep_LINUX.c 2014-01-04 20:19:48.000000000 +0100 +@@ -204,7 +204,7 @@ int initprocesstree_sysdep(ProcessTree_T + ASSERT(reference); + + /* Find all processes in the /proc directory */ +- if ((rv = glob("/proc/[0-9]*", GLOB_ONLYDIR, NULL, &globbuf))) { ++ if ((rv = glob("/proc/[0-9]*", NULL, NULL, &globbuf))) { + LogError("system statistic error -- glob failed: %d (%s)\n", rv, STRERROR); + return FALSE; + } -- cgit v1.2.3 From 9f77a0951b238c0296e993c0904c2a4abd550927 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 5 Jan 2014 20:41:08 +0100 Subject: another round of build fixes --- package/binutils/Makefile | 2 ++ package/cryptsetup/Makefile | 6 ++--- package/screen/Makefile | 1 + package/xf86-video-intel/Makefile | 2 +- package/xf86-video-intel/patches/patch-configure | 32 ------------------------ package/xf86-video-intel/patches/patch-ltmain_sh | 11 -------- 6 files changed, 7 insertions(+), 47 deletions(-) delete mode 100644 package/xf86-video-intel/patches/patch-configure delete mode 100644 package/xf86-video-intel/patches/patch-ltmain_sh (limited to 'package') diff --git a/package/binutils/Makefile b/package/binutils/Makefile index c66ab6d2d..3abf670cd 100644 --- a/package/binutils/Makefile +++ b/package/binutils/Makefile @@ -41,6 +41,8 @@ CONFIGURE_ARGS+= --disable-werror \ else CONFIGURE_ARGS+= --disable-werror endif +# disable honour cflags stuff +XAKE_FLAGS+= GCC_HONOUR_COPTS=s post-build: $(CP) ${WRKBUILD}/libiberty/libiberty.a $(STAGING_TARGET_DIR)/usr/lib diff --git a/package/cryptsetup/Makefile b/package/cryptsetup/Makefile index c98e2e8ac..bf71f5a43 100644 --- a/package/cryptsetup/Makefile +++ b/package/cryptsetup/Makefile @@ -4,9 +4,9 @@ include ${TOPDIR}/rules.mk PKG_NAME:= cryptsetup -PKG_VERSION:= 1.3.1 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 1f5b5a9d538e8a3c191fb7dd85b9b013 +PKG_VERSION:= 1.6.3 +PKG_RELEASE:= 1 +PKG_MD5SUM:= a7aeb549a543eeac433eadfb6bc67837 PKG_DESCR:= LUKS cryptsetup tools PKG_SECTION:= crypto PKG_DEPENDS:= libgcrypt device-mapper libuuid libpopt diff --git a/package/screen/Makefile b/package/screen/Makefile index 244877847..e448c3b29 100644 --- a/package/screen/Makefile +++ b/package/screen/Makefile @@ -18,6 +18,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,SCREEN,screen,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +TARGET_LDFLAGS+= -ltinfo CONFIGURE_ENV+= $(foreach flag,rename fchmod fchown strerror lstat _exit utimes vsnprintf getcwd setlocale strftime,ac_cv_func_${flag}=yes) CONFIGURE_ARGS+= --with-sys-screenrc=/etc/screenrc diff --git a/package/xf86-video-intel/Makefile b/package/xf86-video-intel/Makefile index e49d2e81f..dbb22102c 100644 --- a/package/xf86-video-intel/Makefile +++ b/package/xf86-video-intel/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= xf86-video-intel PKG_VERSION:= 2.19.0 PKG_RELEASE:= 1 -PKG_MD5SUM:= df7e3644a34e97ead09f083ab48d4457 +PKG_MD5SUM:= a5e655904e8da22acb0d9be1badf9815 PKG_DESCR:= X11 driver for Intel VGA chip PKG_SECTION:= x11/drivers PKG_DEPENDS:= xorg-server libdrm mesalib diff --git a/package/xf86-video-intel/patches/patch-configure b/package/xf86-video-intel/patches/patch-configure deleted file mode 100644 index fe5ca4e86..000000000 --- a/package/xf86-video-intel/patches/patch-configure +++ /dev/null @@ -1,32 +0,0 @@ ---- xf86-video-intel-2.13.0.orig/configure 2010-09-30 17:46:13.000000000 +0200 -+++ xf86-video-intel-2.13.0/configure 2010-11-24 22:05:13.100685362 +0100 -@@ -11623,9 +11623,6 @@ if test x$DRI != xno; then - $as_echo_n "checking for ${sdkdir}/dri.h... " >&6; } - if eval "test \"\${$as_ac_File+set}\"" = set; then : - $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 - if test -r "${sdkdir}/dri.h"; then - eval "$as_ac_File=yes" - else -@@ -11646,9 +11643,6 @@ fi - $as_echo_n "checking for ${sdkdir}/sarea.h... " >&6; } - if eval "test \"\${$as_ac_File+set}\"" = set; then : - $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 - if test -r "${sdkdir}/sarea.h"; then - eval "$as_ac_File=yes" - else -@@ -11669,9 +11663,6 @@ fi - $as_echo_n "checking for ${sdkdir}/dristruct.h... " >&6; } - if eval "test \"\${$as_ac_File+set}\"" = set; then : - $as_echo_n "(cached) " >&6 --else -- test "$cross_compiling" = yes && -- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 - if test -r "${sdkdir}/dristruct.h"; then - eval "$as_ac_File=yes" - else diff --git a/package/xf86-video-intel/patches/patch-ltmain_sh b/package/xf86-video-intel/patches/patch-ltmain_sh deleted file mode 100644 index 5cf546d2a..000000000 --- a/package/xf86-video-intel/patches/patch-ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- xf86-video-intel-2.13.0.orig/ltmain.sh 2010-02-25 18:09:43.000000000 +0100 -+++ xf86-video-intel-2.13.0/ltmain.sh 2011-01-17 17:47:33.000000000 +0100 -@@ -4765,7 +4765,7 @@ func_mode_link () - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) -+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-fstack-protector*|-flto) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" -- cgit v1.2.3 From 667bc9e981847a1d117a2fc7110948075a268bdd Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 5 Jan 2014 20:53:53 +0100 Subject: build fixes --- package/dillo/Makefile | 4 ++-- package/vim/Makefile | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'package') diff --git a/package/dillo/Makefile b/package/dillo/Makefile index 6f427d357..17af0de93 100644 --- a/package/dillo/Makefile +++ b/package/dillo/Makefile @@ -25,8 +25,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,DILLO,dillo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) -CONFIGURE_ENV+= PNG_CONFIG=$(STAGING_DIR)/usr/bin/png-config -TARGET_LDFLAGS+= -liconv -lpng15 +CONFIGURE_ENV+= PNG_CONFIG=$(STAGING_TARGET_DIR)/scripts/libpng-config +TARGET_LDFLAGS+= -liconv XAKE_FLAGS+= GCC_HONOUR_COPTS=s CONFIGURE_ARGS+= --enable-ssl diff --git a/package/vim/Makefile b/package/vim/Makefile index f78e1e89f..cd09b8c2f 100644 --- a/package/vim/Makefile +++ b/package/vim/Makefile @@ -23,6 +23,7 @@ include ${TOPDIR}/mk/package.mk $(eval $(call PKG_template,VIM,vim,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) TARGET_CFLAGS+= -lgcc +TARGET_LDFLAGS+= -ltinfo CONFIGURE_ENV+= vim_cv_toupper_broken=no \ vim_cv_getcwd_broken=no \ vim_cv_stat_ignores_slash=yes \ -- cgit v1.2.3 From 5eb808d3b0d2dca7016e7200418a95a0eb6330d4 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 6 Jan 2014 09:54:52 +0100 Subject: musl fixes after update to 0.9.15 --- package/quagga/patches/patch-lib_sockopt_c | 23 ----------------------- package/xorg-server/Makefile | 2 ++ 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 package/quagga/patches/patch-lib_sockopt_c (limited to 'package') diff --git a/package/quagga/patches/patch-lib_sockopt_c b/package/quagga/patches/patch-lib_sockopt_c deleted file mode 100644 index c33333766..000000000 --- a/package/quagga/patches/patch-lib_sockopt_c +++ /dev/null @@ -1,23 +0,0 @@ ---- quagga-0.99.22.4.orig/lib/sockopt.c 2013-04-14 14:46:07.000000000 +0200 -+++ quagga-0.99.22.4/lib/sockopt.c 2013-12-30 19:56:54.000000000 +0100 -@@ -24,6 +24,20 @@ - #include "sockopt.h" - #include "sockunion.h" - -+#if !defined(__GLIBC__) -+/* For TCP_MD5SIG socket option. */ -+#define TCP_MD5SIG_MAXKEYLEN 80 -+ -+struct tcp_md5sig -+{ -+ struct sockaddr_storage tcpm_addr; /* Address associated. */ -+ u_int16_t __tcpm_pad1; /* Zero. */ -+ u_int16_t tcpm_keylen; /* Key length. */ -+ u_int32_t __tcpm_pad2; /* Zero. */ -+ u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ -+}; -+#endif -+ - int - setsockopt_so_recvbuf (int sock, int size) - { diff --git a/package/xorg-server/Makefile b/package/xorg-server/Makefile index 6ca4f67f0..3305779ab 100644 --- a/package/xorg-server/Makefile +++ b/package/xorg-server/Makefile @@ -43,6 +43,8 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,XORG_SERVER,xorg-server,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) +TARGET_CPPFLAGS+= -D_GNU_SOURCE + ifeq (${ADK_PACKAGE_XORG_SERVER_WITH_GCRYPT},y) CONFIGURE_ARGS+= --with-sha1=libgcrypt endif -- cgit v1.2.3 From e70ca34f19c7bbb7632018728a1bf98499eebcf5 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 6 Jan 2014 09:55:09 +0100 Subject: delete jpeg, use libjpeg-turbo --- package/DirectFB/Makefile | 4 ++-- package/ImageMagick/Makefile | 2 +- package/dillo/Makefile | 4 ++-- package/jpeg/Makefile | 31 ------------------------------- package/jpeg/patches/patch-ltmain_sh | 11 ----------- package/libgd/Makefile | 4 ++-- package/links/Makefile | 4 ++-- package/motion/Makefile | 4 ++-- package/mplayer/Makefile | 4 ++-- package/openjdk7/Makefile | 2 +- package/sdl-image/Makefile | 4 ++-- package/v4l-utils/Makefile | 2 +- package/vnc-reflector/Makefile | 4 ++-- package/x11vnc/Makefile | 2 +- package/xbmc/Makefile | 4 ++-- 15 files changed, 22 insertions(+), 64 deletions(-) delete mode 100644 package/jpeg/Makefile delete mode 100644 package/jpeg/patches/patch-ltmain_sh (limited to 'package') diff --git a/package/DirectFB/Makefile b/package/DirectFB/Makefile index 41da96f05..67d3e5003 100644 --- a/package/DirectFB/Makefile +++ b/package/DirectFB/Makefile @@ -10,8 +10,8 @@ PKG_EXTRAVER:= 1.6-0 PKG_MD5SUM:= 641e8e999c017770da647f9b5b890906 PKG_DESCR:= Thin graphic library for the Linux framebuffer devices PKG_SECTION:= libs -PKG_DEPENDS:= libpng libjpeg libfreetype -PKG_BUILDDEP:= libpng jpeg freetype +PKG_DEPENDS:= libpng libjpeg-turbo libfreetype +PKG_BUILDDEP:= libpng libjpeg-turbo freetype PKG_URL:= http://www.directfb.org/ PKG_SITES:= http://directfb.org/downloads/Core/DirectFB-1.6/ PKG_LIBNAME:= directfb diff --git a/package/ImageMagick/Makefile b/package/ImageMagick/Makefile index 5f03351c2..dc42ebe55 100644 --- a/package/ImageMagick/Makefile +++ b/package/ImageMagick/Makefile @@ -10,7 +10,7 @@ PKG_RELEASE:= 3 PKG_MD5SUM:= 8134257e3fbb43cc06fb32a6d725d3d0 PKG_DESCR:= image processing and converting utility PKG_SECTION:= multimedia -PKG_BUILDDEP:= libpng jpeg libtiff fontconfig libiconv-tiny libtool e2fsprogs +PKG_BUILDDEP:= libpng libjpeg-turbo libtiff fontconfig libiconv-tiny libtool e2fsprogs PKG_BUILDDEP+= pango PKG_URL:= http://www.imagemagick.org/ PKG_SITES:= http://image_magick.veidrodis.com/image_magick/ diff --git a/package/dillo/Makefile b/package/dillo/Makefile index 6f427d357..56077e946 100644 --- a/package/dillo/Makefile +++ b/package/dillo/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:= 2 PKG_MD5SUM:= 726cd0b7a18c5e25f4d80ebeffe7607e PKG_DESCR:= small graphical web browser PKG_SECTION:= x11/apps -PKG_DEPENDS:= libfltk libxi libpng zlib libjpeg +PKG_DEPENDS:= libfltk libxi libpng zlib libjpeg-turbo PKG_DEPENDS+= libstdcxx libpthread libgcc libopenssl -PKG_BUILDDEP:= fltk libXi libiconv-tiny jpeg libpng zlib openssl +PKG_BUILDDEP:= fltk libXi libiconv-tiny libjpeg-turbo libpng zlib openssl PKG_URL:= http://www.dillo.org/ PKG_SITES:= http://www.dillo.org/download/ PKG_NEED_CXX:= 1 diff --git a/package/jpeg/Makefile b/package/jpeg/Makefile deleted file mode 100644 index cd7763c5e..000000000 --- a/package/jpeg/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include ${TOPDIR}/rules.mk - -PKG_NAME:= jpeg -PKG_VERSION:= 8d -PKG_RELEASE:= 2 -PKG_MD5SUM:= 52654eb3b2e60c35731ea8fc87f1bd29 -PKG_DESCR:= The Independent JPEG Groups JPEG runtime library -PKG_SECTION:= libs -PKG_URL:= http://www.ijg.org/ -PKG_SITES:= http://www.ijg.org/files/ -PKG_LIBNAME:= libjpeg -PKG_OPTS:= dev - -DISTFILES:= ${PKG_NAME}src.v${PKG_VERSION}.tar.gz - -ifeq ($(ADK_STATIC),y) -PKG_OPTS+= libonly -endif - -include ${TOPDIR}/mk/package.mk - -$(eval $(call PKG_template,LIBJPEG,libjpeg,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) - -libjpeg-install: - ${INSTALL_DIR} ${IDIR_LIBJPEG}/usr/lib - ${CP} ${WRKINST}/usr/lib/libjpeg.so* ${IDIR_LIBJPEG}/usr/lib/ - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/jpeg/patches/patch-ltmain_sh b/package/jpeg/patches/patch-ltmain_sh deleted file mode 100644 index 234778820..000000000 --- a/package/jpeg/patches/patch-ltmain_sh +++ /dev/null @@ -1,11 +0,0 @@ ---- jpeg-8d.orig/ltmain.sh 2011-12-22 14:48:30.000000000 +0100 -+++ jpeg-8d/ltmain.sh 2012-10-15 10:59:49.000000000 +0200 -@@ -5853,7 +5853,7 @@ func_mode_link () - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -- -O*|-flto*|-fwhopr*|-fuse-linker-plugin) -+ -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" diff --git a/package/libgd/Makefile b/package/libgd/Makefile index e4d913beb..608c7ed8a 100644 --- a/package/libgd/Makefile +++ b/package/libgd/Makefile @@ -9,8 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 03588159bf4faab9079849c8d709acc6 PKG_DESCR:= A library for the dynamic creation of images PKG_SECTION:= libs -PKG_DEPENDS:= libjpeg libpng -PKG_BUILDDEP:= libpng jpeg +PKG_DEPENDS:= libjpeg-turbo libpng +PKG_BUILDDEP:= libpng libjpeg-turbo PKG_URL:= http://www.libgd.org/ PKG_SITES:= https://bitbucket.org/libgd/gd-libgd/downloads/ PKG_LIBNAME:= libgd diff --git a/package/links/Makefile b/package/links/Makefile index f2cdf6b12..ab1f7e592 100644 --- a/package/links/Makefile +++ b/package/links/Makefile @@ -9,8 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 6b5ca02e180aed2f78ca2712f85e3ba5 PKG_DESCR:= web browser with graphic support PKG_SECTION:= browser -PKG_DEPENDS:= libpng libjpeg libtiff gpm libopenssl -PKG_BUILDDEP:= openssl libpng jpeg gpm +PKG_DEPENDS:= libpng libjpeg-turbo libtiff gpm libopenssl +PKG_BUILDDEP:= openssl libpng libjpeg-turbo gpm PKG_URL:= http://links.twibright.com/ PKG_SITES:= http://links.twibright.com/download/ diff --git a/package/motion/Makefile b/package/motion/Makefile index e2974e1fc..69f96ea05 100644 --- a/package/motion/Makefile +++ b/package/motion/Makefile @@ -10,8 +10,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 6b8730c875e0f550c1abdb647027d8e1 PKG_DESCR:= Webcam motion sensing and logging PKG_SECTION:= multimedia -PKG_DEPENDS:= libjpeg libpthread libsdl -PKG_BUILDDEP:= jpeg sdl +PKG_DEPENDS:= libjpeg-turbo libpthread libsdl +PKG_BUILDDEP:= libjpeg-turbo sdl PKG_URL:= http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=motion/} diff --git a/package/mplayer/Makefile b/package/mplayer/Makefile index 2a6b2533f..a6851f3fa 100644 --- a/package/mplayer/Makefile +++ b/package/mplayer/Makefile @@ -9,12 +9,12 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 39dd55f30eb5403f219a606e79a6648a PKG_DESCR:= popular video player PKG_SECTION:= multimedia -PKG_DEPENDS:= alsa-lib libjpeg libfaad2 libmad libncurses +PKG_DEPENDS:= alsa-lib libjpeg-turbo libfaad2 libmad libncurses PKG_DEPENDS+= libogg libpng libpthread libvorbis giflib PKG_DEPENDS+= libx11 libxau libxdmcp libxext libxv zlib PKG_DEPENDS+= libxscrnsaver libtheora libxvid libvpx PKG_BUILDDEP:= alsa-lib libmad libvorbis faad2 ncurses zlib -PKG_BUILDDEP+= libX11 libXv libpng libXext jpeg libtheora +PKG_BUILDDEP+= libX11 libXv libpng libXext libjpeg-turbo libtheora PKG_BUILDDEP+= xvidcore libvpx gettext-tiny PKG_URL:= http://www.mplayerhq.hu/ PKG_SITES:= http://www.mplayerhq.hu/MPlayer/releases/ diff --git a/package/openjdk7/Makefile b/package/openjdk7/Makefile index d51a80d8b..2787168bf 100644 --- a/package/openjdk7/Makefile +++ b/package/openjdk7/Makefile @@ -10,7 +10,7 @@ PKG_MD5SUM:= e96e5e578d442d3ae56cd332e8dbc6b6 PKG_DESCR:= OpenJDK 7 Java VM PKG_SECTION:= lang PKG_BUILDDEP:= gettext-tiny-host glib-host flex-host bison-host qemu-host -PKG_BUILDDEP+= alsa-lib xproto jpeg zlib giflib libpng freetype cups +PKG_BUILDDEP+= alsa-lib xproto libjpeg-turbo zlib giflib libpng freetype cups PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst libiconv-tiny PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi libgcc PKG_URL:= http://openjdk.org/ diff --git a/package/sdl-image/Makefile b/package/sdl-image/Makefile index 3f5e2b06d..14fa39434 100644 --- a/package/sdl-image/Makefile +++ b/package/sdl-image/Makefile @@ -9,8 +9,8 @@ PKG_RELEASE:= 2 PKG_MD5SUM:= 6c06584b31559e2b59f2b982d0d1f628 PKG_DESCR:= Simple DirectMedia Layer PKG_SECTION:= libs -PKG_DEPENDS:= libpng libtiff libjpeg libsdl -PKG_BUILDDEP:= sdl-image-host libpng libtiff jpeg sdl +PKG_DEPENDS:= libpng libtiff libjpeg-turbo libsdl +PKG_BUILDDEP:= sdl-image-host libpng libtiff libjpeg-turbo sdl PKG_URL:= http://www.libsdl.org/ PKG_SITES:= http://www.libsdl.org/projects/SDL_image/release/ PKG_NEED_CXX:= 1 diff --git a/package/v4l-utils/Makefile b/package/v4l-utils/Makefile index 70bcc28d6..f4879acdd 100644 --- a/package/v4l-utils/Makefile +++ b/package/v4l-utils/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 2127f2d06be9162b0d346f7037a9e852 PKG_DESCR:= Video4Linux2 utilities PKG_SECTION:= multimedia -PKG_BUILDDEP:= jpeg +PKG_BUILDDEP:= libjpeg-turbo PKG_SITES:= http://linuxtv.org/downloads/v4l-utils/ PKG_LIBNAME:= libv4l PKG_OPTS:= dev diff --git a/package/vnc-reflector/Makefile b/package/vnc-reflector/Makefile index 3be33a3a7..d6c36d88f 100644 --- a/package/vnc-reflector/Makefile +++ b/package/vnc-reflector/Makefile @@ -9,8 +9,8 @@ PKG_RELEASE:= 2 PKG_MD5SUM:= c3f88bc62f228b335c25c07f9744ab0c PKG_DESCR:= specialized VNC server which acts as a proxy PKG_SECTION:= proxy -PKG_DEPENDS:= libjpeg zlib -PKG_BUILDDEP:= jpeg zlib +PKG_DEPENDS:= libjpeg-turbo zlib +PKG_BUILDDEP:= libjpeg-turbo zlib PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=vnc-reflector/} DISTFILES:= vnc_reflector-${PKG_VERSION}.tar.gz diff --git a/package/x11vnc/Makefile b/package/x11vnc/Makefile index ef5a2d428..e98d28416 100644 --- a/package/x11vnc/Makefile +++ b/package/x11vnc/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= 1498a68d02aa7b6c97bf746c073c8d00 PKG_DESCR:= VNC server for X11 displays PKG_SECTION:= x11/apps -PKG_BUILDDEP:= libX11 libXtst jpeg +PKG_BUILDDEP:= libX11 libXtst libjpeg-turbo PKG_URL:= http://www.karlrunge.com/x11vnc/ PKG_SITES:= http://openadk.org/distfiles/ diff --git a/package/xbmc/Makefile b/package/xbmc/Makefile index aa971d872..236cd78b6 100644 --- a/package/xbmc/Makefile +++ b/package/xbmc/Makefile @@ -11,7 +11,7 @@ PKG_DESCR:= software media player PKG_SECTION:= multimedia PKG_DEPENDS:= boost libffmpeg python2 libstdcxx bcm2835-vc PKG_DEPENDS+= libglew mesalib libass libmpeg2 libmad dbus -PKG_DEPENDS+= libjpeg libogg libvorbis libmodplug libcurl +PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl PKG_DEPENDS+= libflac libopenssl libbz2 libtiff liblzo PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate @@ -19,7 +19,7 @@ PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd PKG_DEPENDS+= omxplayer libusb-compat libbluray libgpg-error PKG_DEPENDS+= libssh libcec libnfs librtmp PKG_BUILDDEP:= autotool boost ffmpeg python2 MesaLib libglew libass -PKG_BUILDDEP+= libmpeg2 libmad jpeg libogg libvorbis libmodplug +PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis libmodplug PKG_BUILDDEP+= curl flac openssl bzip2 libtiff liblzo yajl PKG_BUILDDEP+= tinyxml sqlite pcre libpng libcdio freetype PKG_BUILDDEP+= libsamplerate taglib libjasper lame libmicrohttpd -- cgit v1.2.3