csound: update to 6.12.0.
Remove *-musl support. Please push patches upstream, or enable them only for *-musl.
This commit is contained in:
parent
c662039883
commit
471adf2217
6 changed files with 7 additions and 257 deletions
|
@ -1,38 +0,0 @@
|
|||
--- OOps/ugrw1.c 2018-05-10 10:31:20.000000000 +0200
|
||||
+++ OOps/ugrw1.c 2018-05-13 10:40:15.438512047 +0200
|
||||
@@ -1057,7 +1057,7 @@
|
||||
*/
|
||||
static int32_t sprints(char *outstring, char *fmt, MYFLT **kvals, int32_t numVals)
|
||||
{
|
||||
- char tmp[8],cc;
|
||||
+ char tmp[10],cc;
|
||||
int32_t j = 0;
|
||||
int32_t len = 8192;
|
||||
while (*fmt) {
|
||||
--- Engine/csound_orc_expressions.c.orig 2018-09-24 19:09:36.956995269 +0200
|
||||
+++ Engine/csound_orc_expressions.c 2018-09-24 19:11:09.401989759 +0200
|
||||
@@ -826,10 +826,10 @@
|
||||
|
||||
static TREE *create_synthetic_ident(CSOUND *csound, int32 count)
|
||||
{
|
||||
- char *label = (char *)csound->Calloc(csound, 20);
|
||||
+ char *label = (char *)csound->Calloc(csound, 32);
|
||||
ORCTOKEN *token;
|
||||
|
||||
- snprintf(label, 20, "__synthetic_%"PRIi32, count);
|
||||
+ snprintf(label, 32, "__synthetic_%"PRIi32, count);
|
||||
if (UNLIKELY(PARSER_DEBUG))
|
||||
csound->Message(csound, "Creating Synthetic T_IDENT: %s\n", label);
|
||||
token = make_token(csound, label);
|
||||
@@ -840,9 +840,9 @@
|
||||
|
||||
static TREE *create_synthetic_label(CSOUND *csound, int32 count)
|
||||
{
|
||||
- char *label = (char *)csound->Calloc(csound, 20);
|
||||
+ char *label = (char *)csound->Calloc(csound, 32);
|
||||
ORCTOKEN *token;
|
||||
- snprintf(label, 20, "__synthetic_%"PRIi32":", count);
|
||||
+ snprintf(label, 32, "__synthetic_%"PRIi32":", count);
|
||||
if (UNLIKELY(PARSER_DEBUG))
|
||||
csound->Message(csound, "Creating Synthetic label: %s\n", label);
|
||||
token = make_label(csound, label);
|
|
@ -1,22 +0,0 @@
|
|||
--- Top/csound.c.orig 2017-07-12 14:54:27.000000000 +0200
|
||||
+++ Top/csound.c 2017-07-17 17:27:27.064603813 +0200
|
||||
@@ -1089,7 +1089,7 @@
|
||||
|
||||
static void signal_handler(int sig)
|
||||
{
|
||||
-#if defined(LINUX) && !defined(ANDROID) && !defined(NACL)
|
||||
+#if defined(__GLIBC__)
|
||||
#include <execinfo.h>
|
||||
|
||||
{
|
||||
--- Opcodes/linuxjoystick.c 2018-05-10 10:31:20.000000000 +0200
|
||||
+++ Opcodes/linuxjoystick.c 2018-05-13 10:47:51.360535568 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include "linuxjoystick.h"
|
||||
-#include <sys/errno.h>
|
||||
+#include <errno.h>
|
||||
|
||||
static int32_t linuxjoystick (CSOUND *csound, LINUXJOYSTICK *stick)
|
||||
{
|
|
@ -1,95 +0,0 @@
|
|||
--- Engine/csound_orc_semantics.c.orig 2018-09-24 20:32:36.504698465 +0200
|
||||
+++ Engine/csound_orc_semantics.c 2018-09-24 20:33:24.792695587 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
retVal = csound->Malloc(csound, len + 1);
|
||||
|
||||
if (len > 0) {
|
||||
- strncpy(retVal, str, len);
|
||||
+ memcpy(retVal, str, len);
|
||||
}
|
||||
retVal[len] = '\0';
|
||||
|
||||
@@ -389,8 +389,8 @@
|
||||
len2 = strlen(argTypeRight);
|
||||
inArgTypes = csound->Malloc(csound, len1 + len2 + 1);
|
||||
|
||||
- strncpy(inArgTypes, argTypeLeft, len1);
|
||||
- strncpy(inArgTypes + len1, argTypeRight, len2);
|
||||
+ memcpy(inArgTypes, argTypeLeft, len1);
|
||||
+ memcpy(inArgTypes + len1, argTypeRight, len2);
|
||||
|
||||
inArgTypes[len1 + len2] = '\0';
|
||||
|
||||
@@ -447,8 +447,8 @@
|
||||
len2 = strlen(argTypeRight);
|
||||
inArgTypes = csound->Malloc(csound, len1 + len2 + 1);
|
||||
|
||||
- strncpy(inArgTypes, argTypeLeft, len1);
|
||||
- strncpy(inArgTypes + len1, argTypeRight, len2);
|
||||
+ memcpy(inArgTypes, argTypeLeft, len1);
|
||||
+ memcpy(inArgTypes + len1, argTypeRight, len2);
|
||||
|
||||
inArgTypes[len1 + len2] = '\0';
|
||||
|
||||
--- util1/csd_util/cs.c.orig 2018-09-24 20:42:03.578664665 +0200
|
||||
+++ util1/csd_util/cs.c 2018-09-24 20:44:51.364654664 +0200
|
||||
@@ -112,7 +112,7 @@
|
||||
strcpy(dir, "./");
|
||||
#endif
|
||||
else {
|
||||
- strncpy(dir, fullname, m + 1);
|
||||
+ memcpy(dir, fullname, m + 1);
|
||||
dir[m + 1] = '\0';
|
||||
}
|
||||
/* base name */
|
||||
@@ -385,7 +385,8 @@
|
||||
while (--j) {
|
||||
i++;
|
||||
if (argv[i][0] != '-' && i < 3 && tmp[0] == '\0') {
|
||||
- strncpy(tmp, argv[i],256);
|
||||
+ memcpy(tmp, argv[i], sizeof(tmp));
|
||||
+ tmp[sizeof(tmp) - 1] = '\0';
|
||||
/* strip extension */
|
||||
if (is_orc(tmp) || is_sco(tmp) || is_mid(tmp) || is_csd(tmp))
|
||||
tmp[strlen(tmp) - 4] = '\0';
|
||||
@@ -427,20 +428,24 @@
|
||||
/* first, search environment variables, based on option list */
|
||||
/* (the last option has the highest precedence) */
|
||||
s = getenv("CSOUND");
|
||||
- if (s != NULL) /* get default setting from CSOUND, if available */
|
||||
- strncpy(tmp, s, 256);
|
||||
+ if (s != NULL) { /* get default setting from CSOUND, if available */
|
||||
+ memcpy(tmp, s, sizeof(tmp));
|
||||
+ tmp[sizeof(tmp) - 1] = '\0';
|
||||
+ }
|
||||
for (i = (int) strlen(optlst); --i >= 0; ) {
|
||||
sprintf(tmp2, "CSOUND_%c", optlst[i]);
|
||||
s = getenv(tmp2);
|
||||
if (s != NULL) {
|
||||
- strncpy(tmp, s, 256);
|
||||
+ memcpy(tmp, s, sizeof(tmp));
|
||||
+ tmp[sizeof(tmp) - 1] = '\0';
|
||||
if (tmp[0] != '\0') break;
|
||||
}
|
||||
}
|
||||
/* if nothing was found, use default settings */
|
||||
if (tmp[0] == '\0') {
|
||||
- if (opts[17]) strncpy(tmp, default_csnd_r, 256);
|
||||
- else strncpy(tmp, default_csnd, 256);
|
||||
+ if (opts[17]) memcpy(tmp, default_csnd_r, sizeof(default_csnd_r));
|
||||
+ else memcpy(tmp, default_csnd, sizeof(default_csnd));
|
||||
+ tmp[sizeof(tmp) - 1] = '\0';
|
||||
}
|
||||
/* convert this to a list of quoted options */
|
||||
s2 = cmdline;
|
||||
--- util1/scot/scot.c.orig 2018-09-24 21:04:03.987585962 +0200
|
||||
+++ util1/scot/scot.c 2018-09-24 21:04:47.448583372 +0200
|
||||
@@ -684,7 +684,7 @@
|
||||
|
||||
ps = findparam(n, ptop);
|
||||
if (strcmp(s, "."))
|
||||
- strncpy(ps, s, 1+strlen(s));
|
||||
+ memcpy(ps, s, 1+strlen(s));
|
||||
}
|
||||
|
||||
static /* returns pointer to */
|
|
@ -1,89 +0,0 @@
|
|||
Source: written by @pullmoll
|
||||
Upstream: n/a
|
||||
Reason: replace legacy sprintf with snprintf to avoid buffer overruns and fix gcc-8 warnings/errors.
|
||||
|
||||
--- OOps/schedule.c.orig 2018-09-24 18:54:29.373049365 +0200
|
||||
+++ OOps/schedule.c 2018-09-24 19:04:41.067012905 +0200
|
||||
@@ -56,22 +56,27 @@
|
||||
return eventOpcodeI_(csound, &pp, 0, 'i');
|
||||
}
|
||||
|
||||
-static void add_string_arg(char *s, const char *arg) {
|
||||
- int32_t offs = strlen(s) ;
|
||||
- //char *c = s;
|
||||
- s += offs;
|
||||
- *s++ = ' ';
|
||||
-
|
||||
- *s++ ='\"';
|
||||
- while(*arg != '\0') {
|
||||
- if(*arg == '\"')
|
||||
- *s++ = '\\';
|
||||
- *s++ = *arg++;
|
||||
+static void add_string_arg(char *s, size_t size, const char *arg) {
|
||||
+ size_t offs = strlen(s);
|
||||
+ size_t len;
|
||||
+ len = snprintf(s + offs, size - offs, " \"");
|
||||
+ if (len <= 0)
|
||||
+ return;
|
||||
+ offs += len;
|
||||
+ while (*arg != '\0') {
|
||||
+ if (*arg == '\"') {
|
||||
+ len = snprintf(s + offs, size - offs, "\\");
|
||||
+ if (len <= 0)
|
||||
+ return;
|
||||
+ offs += len;
|
||||
+ }
|
||||
+ len = snprintf(s + offs, size - offs, "%c", *arg);
|
||||
+ if (len <= 0)
|
||||
+ return;
|
||||
+ offs += len;
|
||||
+ arg++;
|
||||
}
|
||||
-
|
||||
- *s++ = '\"';
|
||||
- *s = '\0';
|
||||
- //printf("%s \n", c);
|
||||
+ snprintf(s + offs, size - offs, "\"");
|
||||
}
|
||||
|
||||
|
||||
@@ -79,15 +84,16 @@
|
||||
{
|
||||
int32_t i;
|
||||
int32_t argno = p->INOCOUNT+1;
|
||||
+ size_t len;
|
||||
char s[16384];
|
||||
- sprintf(s, "i %f %f %f", *p->which, *p->when, *p->dur);
|
||||
+ len = snprintf(s, sizeof(s), "i %f %f %f", *p->which, *p->when, *p->dur);
|
||||
for (i=4; i < argno ; i++) {
|
||||
MYFLT *arg = p->argums[i-4];
|
||||
if (csoundGetTypeForArg(arg) == &CS_VAR_TYPE_S) {
|
||||
- add_string_arg(s, ((STRINGDAT *)arg)->data);
|
||||
- //sprintf(s, "%s \"%s\" ", s, ((STRINGDAT *)arg)->data);
|
||||
+ add_string_arg(s, sizeof(s), ((STRINGDAT *)arg)->data);
|
||||
+ //snprintf(s, sizeof(s), "%s \"%s\" ", s, ((STRINGDAT *)arg)->data);
|
||||
}
|
||||
- else sprintf(s, "%s %f", s, *arg);
|
||||
+ else snprintf(s + len, sizeof(s) - len, " %f", *arg);
|
||||
|
||||
}
|
||||
|
||||
@@ -99,14 +105,14 @@
|
||||
{
|
||||
int32_t i;
|
||||
int32_t argno = p->INOCOUNT+1;
|
||||
+ size_t len;
|
||||
char s[16384];
|
||||
- sprintf(s, "i \"%s\" %f %f", ((STRINGDAT *)p->which)->data, *p->when, *p->dur);
|
||||
+ len = snprintf(s, sizeof(s), "i \"%s\" %f %f", ((STRINGDAT *)p->which)->data, *p->when, *p->dur);
|
||||
for (i=4; i < argno ; i++) {
|
||||
MYFLT *arg = p->argums[i-4];
|
||||
if (csoundGetTypeForArg(arg) == &CS_VAR_TYPE_S)
|
||||
- //sprintf(s, "%s \"%s\" ", s, ((STRINGDAT *)arg)->data);
|
||||
- add_string_arg(s, ((STRINGDAT *)arg)->data);
|
||||
- else sprintf(s, "%s %f", s, *arg);
|
||||
+ add_string_arg(s, sizeof(s), ((STRINGDAT *)arg)->data);
|
||||
+ else snprintf(s + len, sizeof(s) - len, " %f", *arg);
|
||||
}
|
||||
//printf("%s\n", s);
|
||||
csoundInputMessageInternal(csound, s);
|
|
@ -1,10 +0,0 @@
|
|||
--- Top/threadsafe.c 2018-05-10 10:31:20.000000000 +0200
|
||||
+++ Top/threadsafe.c 2018-05-13 10:45:03.246526895 +0200
|
||||
@@ -551,6 +551,7 @@
|
||||
csoundSpinLock(lock);
|
||||
*pval = val;
|
||||
csoundSpinUnLock(lock);
|
||||
+ (void)x;
|
||||
}
|
||||
#endif
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'csound'
|
||||
pkgname=csound
|
||||
version=6.11.0
|
||||
revision=2
|
||||
version=6.12.0
|
||||
revision=1
|
||||
build_style=cmake
|
||||
configure_args="
|
||||
-DLUA_MODULE_INSTALL_DIR=${XBPS_CROSS_BASE}/usr/lib/lua/5.1
|
||||
|
@ -17,11 +17,15 @@ maintainer="Andrea Brancaleoni <abc@pompel.me>"
|
|||
license="LGPL-2.1-or-later"
|
||||
homepage="https://csound.com/"
|
||||
distfiles="https://github.com/${pkgname}/${pkgname}/archive/${version}.tar.gz"
|
||||
checksum=f47df73ff270faa70bf53bad68edc85b2dc5623b9c73d06054cd03f5d3332dc0
|
||||
checksum=edb0f6ac3cffa58a992f5c1f88e0e208e6559e0a84b34ec7ec2c0cf4b917d674
|
||||
nocross=yes
|
||||
|
||||
CXXFLAGS="-Wno-error"
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl) broken="not yet supported";;
|
||||
esac
|
||||
|
||||
post_install() {
|
||||
vinstall ${FILESDIR}/csound.sh 755 etc/profile.d
|
||||
# Avoid conflict with libextractor
|
||||
|
|
Loading…
Reference in a new issue