ports/118466: [patch] audio/gsi unbreak fix build with GCC 4.2 + adopt maintainship
Pietro Cerutti
gahr at gahr.ch
Thu Dec 6 16:20:01 UTC 2007
>Number: 118466
>Category: ports
>Synopsis: [patch] audio/gsi unbreak fix build with GCC 4.2 + adopt maintainship
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 06 16:20:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release: FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 8.0-CURRENT #15: Thu Dec 6 12:47:48 CET 2007
root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034
>Description:
The patch below:
- fixes a "cast where lvalue is required" error with GCC 4.2
- sets maintainship to me
Tested on:
8.0-CURRENT i386 (little endian *)
7.0-BETA3 sparc64 (big endian *)
6.2-RELEASE-p6 i386 (little endian *)
* endianess is specified because of the patch dealing with endianess-aware code
>How-To-Repeat:
cd /usr/ports/audio/gsi && make
>Fix:
--- _gsi.diff begins here ---
--- Makefile.orig 2007-12-06 16:41:53.000000000 +0100
+++ Makefile 2007-12-06 17:00:01.000000000 +0100
@@ -12,7 +12,7 @@
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= gahr at gahr.ch
COMMENT= General sound interface
USE_BZIP2= yes
@@ -28,24 +28,18 @@
MAN7= gsi_overview.7
MAN8= gsi_server.8
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042
-BROKEN= Broken with gcc 4.2
-.endif
-
post-extract:
@${RM} -f ${WRKSRC}/lib/include/gsi/gsisynth.h
post-patch:
-.for file in lib/device/gsimixer/api/mixer_fbsd.c \
+.for f in lib/device/gsimixer/api/mixer_fbsd.c \
lib/device/gsipcm/api/pcm_fbsd.c
@${REINPLACE_CMD} -e \
- 's|machine/soundcard.h|sys/soundcard.h|g' ${WRKSRC}/${file}
+ 's|machine/soundcard.h|sys/soundcard.h|g' ${WRKSRC}/${f}
.endfor
-.for file in server/FINISH_host_allow.c server/client.c server/conf.c
+.for f in server/FINISH_host_allow.c server/client.c server/conf.c
@${REINPLACE_CMD} -e \
- 's|"/etc/|"${PREFIX}/etc/|g' ${WRKSRC}/${file}
+ 's|"/etc/|"${PREFIX}/etc/|g' ${WRKSRC}/${f}
.endfor
do-configure:
@@ -63,4 +57,4 @@
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
--- /dev/null 2007-12-06 17:04:51.000000000 +0100
+++ files/patch-lib-gsif-sample_convert_block.c 2007-12-06 17:05:24.000000000 +0100
@@ -0,0 +1,44 @@
+--- lib/gsif/sample/convert_block.c.orig 2001-01-30 13:28:09.000000000 +0100
++++ lib/gsif/sample/convert_block.c 2007-12-06 17:04:45.000000000 +0100
+@@ -122,9 +122,9 @@
+ break;
+ case GSI_16BIT:
+ #ifdef SYSCONFIG_LITTLE_ENDIAN_MACHINE
+- input_val = (int) (int16) ( ((*input++) << 8) | (*input++) );
++ input_val = (int) (int16) ( (*input++ << 8) | *input++ );
+ #else
+- input_val = *((int16 *)input)++;
++ input_val = *input++;
+ #endif
+ break;
+ case GSI_8BIT_SIGNED:
+@@ -132,9 +132,9 @@
+ break;
+ case GSI_16BIT_LE:
+ #ifdef SYSCONFIG_LITTLE_ENDIAN_MACHINE
+- input_val = *((int16 *)input)++;
++ input_val = *input++;
+ #else
+- input_val = (int) (int16) (*input++ | ((*input++) << 8) );
++ input_val = (int) (int16) (*(input++) | ((*input++) << 8) );
+ #endif
+ break;
+ case GSI_24BIT:
+@@ -170,7 +170,7 @@
+ *output++ = (input_val >> 8) & 255;
+ *output++ = (input_val & 255);
+ #else
+- *((int16 *) output)++ = input_val;
++ *output++ = input_val;
+ #endif
+ break;
+ case GSI_8BIT_SIGNED:
+@@ -178,7 +178,7 @@
+ break;
+ case GSI_16BIT_LE:
+ #ifdef SYSCONFIG_LITTLE_ENDIAN_MACHINE
+- *((int16 *) output)++ = input_val;
++ *output++ = input_val;
+ #else
+ *output++ = (input_val >> 8) & 255;
+ *output++ = (input_val & 255);
--- _gsi.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list