Mon May 2 02:32:14 2016 UTC ()
PR 50556: comms/lirc doesn't build
Add patches to work around gcc inline mess.

Note: this package should be updated and the PR contains an update, but
I don't want to do that when I can't compile it (whereas simple mechanical
patches are much less likely to go astray...)


(dholland)
diff -r1.2 -r1.3 pkgsrc/comms/lirc/distinfo
diff -r0 -r1.1 pkgsrc/comms/lirc/patches/patch-daemons_config__file.c
diff -r0 -r1.1 pkgsrc/comms/lirc/patches/patch-daemons_config__file.h
diff -r0 -r1.1 pkgsrc/comms/lirc/patches/patch-daemons_receive.c
diff -r0 -r1.1 pkgsrc/comms/lirc/patches/patch-daemons_receive.h
diff -r0 -r1.1 pkgsrc/comms/lirc/patches/patch-daemons_transmit.c
diff -r0 -r1.1 pkgsrc/comms/lirc/patches/patch-daemons_transmit.h

cvs diff -r1.2 -r1.3 pkgsrc/comms/lirc/distinfo (expand / switch to unified diff)

--- pkgsrc/comms/lirc/distinfo 2015/11/03 01:34:55 1.2
+++ pkgsrc/comms/lirc/distinfo 2016/05/02 02:32:14 1.3
@@ -1,6 +1,12 @@ @@ -1,6 +1,12 @@
1$NetBSD: distinfo,v 1.2 2015/11/03 01:34:55 agc Exp $ 1$NetBSD: distinfo,v 1.3 2016/05/02 02:32:14 dholland Exp $
2 2
3SHA1 (lirc-0.9.0.tar.bz2) = 8456bf7101d4f2d31d61c5073357a4981b458581 3SHA1 (lirc-0.9.0.tar.bz2) = 8456bf7101d4f2d31d61c5073357a4981b458581
4RMD160 (lirc-0.9.0.tar.bz2) = d8f1cf3a03573be36787e87adc71beba3e678a37 4RMD160 (lirc-0.9.0.tar.bz2) = d8f1cf3a03573be36787e87adc71beba3e678a37
5SHA512 (lirc-0.9.0.tar.bz2) = e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431 5SHA512 (lirc-0.9.0.tar.bz2) = e91534c63e6065bd7da3b15e1676edf1672b8beb21864a6825df86247d7d165bf2dee6f8191732933e24e42a406e46afc55559948e4061eed2de7b08fac13431
6Size (lirc-0.9.0.tar.bz2) = 857286 bytes 6Size (lirc-0.9.0.tar.bz2) = 857286 bytes
 7SHA1 (patch-daemons_config__file.c) = 1a0c581aab83217e02abca7e3080ab8abba74d8c
 8SHA1 (patch-daemons_config__file.h) = 5f0e21dc8ceffff9d5d82f05bd92f6dc8041813d
 9SHA1 (patch-daemons_receive.c) = 4b2df8f3a954b51dd1df433aabdc515b49ab3e23
 10SHA1 (patch-daemons_receive.h) = 82bb820eb9766cec02f20b3b2fbd1f5d7d9b5d68
 11SHA1 (patch-daemons_transmit.c) = 53ee2de7599c94945151acae9ec004bbfc1e71fc
 12SHA1 (patch-daemons_transmit.h) = e5ffa99809003e1035978d148162cd624c4264c7

File Added: pkgsrc/comms/lirc/patches/patch-daemons_config__file.c
$NetBSD: patch-daemons_config__file.c,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/config_file.c~	2011-03-25 22:28:18.000000000 +0000
+++ daemons/config_file.c
@@ -77,7 +77,7 @@ int add_void_array(struct void_array *ar
 	return (1);
 }
 
-inline void *get_void_array(struct void_array *ar)
+static inline void *get_void_array(struct void_array *ar)
 {
 	return (ar->ptr);
 }

File Added: pkgsrc/comms/lirc/patches/patch-daemons_config__file.h
$NetBSD: patch-daemons_config__file.h,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/config_file.h~	2011-03-25 22:28:18.000000000 +0000
+++ daemons/config_file.h
@@ -67,7 +67,6 @@ struct void_array {
 
 void **init_void_array(struct void_array *ar, size_t chunk_size, size_t item_size);
 int add_void_array(struct void_array *ar, void *data);
-inline void *get_void_array(struct void_array *ar);
 
 /* some safer functions */
 void *s_malloc(size_t size);

File Added: pkgsrc/comms/lirc/patches/patch-daemons_receive.c
$NetBSD: patch-daemons_receive.c,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/receive.c~	2011-03-25 22:28:18.000000000 +0000
+++ daemons/receive.c
@@ -25,12 +25,12 @@ extern struct ir_remote *last_remote;
 
 struct rbuf rec_buffer;
 
-inline lirc_t lirc_t_max(lirc_t a, lirc_t b)
+static inline lirc_t lirc_t_max(lirc_t a, lirc_t b)
 {
 	return (a > b ? a : b);
 }
 
-inline void set_pending_pulse(lirc_t deltap)
+static inline void set_pending_pulse(lirc_t deltap)
 {
 	LOGPRINTF(5, "pending pulse: %lu", deltap);
 	rec_buffer.pendingp = deltap;
@@ -378,7 +378,7 @@ inline int expectzero(struct ir_remote *
 	return (1);
 }
 
-inline lirc_t sync_rec_buffer(struct ir_remote * remote)
+static inline lirc_t sync_rec_buffer(struct ir_remote * remote)
 {
 	int count;
 	lirc_t deltas, deltap;
@@ -414,7 +414,7 @@ inline lirc_t sync_rec_buffer(struct ir_
 	return (deltas);
 }
 
-inline int get_header(struct ir_remote *remote)
+static inline int get_header(struct ir_remote *remote)
 {
 	if (is_rcmm(remote)) {
 		lirc_t deltap, deltas, sum;
@@ -524,7 +524,7 @@ inline int get_gap(struct ir_remote *rem
 	return (1);
 }
 
-inline int get_repeat(struct ir_remote *remote)
+static inline int get_repeat(struct ir_remote *remote)
 {
 	if (!get_lead(remote))
 		return (0);

File Added: pkgsrc/comms/lirc/patches/patch-daemons_receive.h
$NetBSD: patch-daemons_receive.h,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/receive.h~	2011-03-25 22:28:18.000000000 +0000
+++ daemons/receive.h
@@ -39,7 +39,6 @@ static inline lirc_t receive_timeout(lir
 	return 2 * usec < MIN_RECEIVE_TIMEOUT ? MIN_RECEIVE_TIMEOUT : 2 * usec;
 }
 
-inline lirc_t lirc_t_max(lirc_t a, lirc_t b);
 void init_rec_buffer();
 int clear_rec_buffer(void);
 int receive_decode(struct ir_remote *remote, ir_code * prep, ir_code * codep, ir_code * postp, int *repeat_flag,

File Added: pkgsrc/comms/lirc/patches/patch-daemons_transmit.c
$NetBSD: patch-daemons_transmit.c,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/transmit.c~	2011-03-25 22:28:18.000000000 +0000
+++ daemons/transmit.c
@@ -27,7 +27,7 @@ struct sbuf send_buffer;
 static void send_signals(lirc_t * signals, int n);
 static int init_send_or_sim(struct ir_remote *remote, struct ir_ncode *code, int sim, int repeat_preset);
 
-inline void set_bit(ir_code * code, int bit, int data)
+void set_bit(ir_code * code, int bit, int data)
 {
 	(*code) &= ~((((ir_code) 1) << bit));
 	(*code) |= ((ir_code) (data ? 1 : 0) << bit);

File Added: pkgsrc/comms/lirc/patches/patch-daemons_transmit.h
$NetBSD: patch-daemons_transmit.h,v 1.1 2016/05/02 02:32:14 dholland Exp $

Patch up gcc inline mess.

--- daemons/transmit.h~	2011-03-25 22:28:18.000000000 +0000
+++ daemons/transmit.h
@@ -29,7 +29,7 @@ struct sbuf {
 };
 
 void init_send_buffer(void);
-inline void set_bit(ir_code * code, int bit, int data);
+void set_bit(ir_code * code, int bit, int data);
 int init_send(struct ir_remote *remote, struct ir_ncode *code);
 int init_sim(struct ir_remote *remote, struct ir_ncode *code, int repeat_preset);