Update to 4.13. Use only regexes to patch getstring.c.

This commit is contained in:
Trevor Johnson 2001-06-04 13:28:35 +00:00
parent bdc8739080
commit 304b4791ba
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=43488
3 changed files with 4 additions and 52 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= csound
PORTVERSION= 4.12
PORTVERSION= 4.13
CATEGORIES= audio
MASTER_SITES= ftp://ftp.maths.bath.ac.uk/pub/dream/newest/
DISTFILES= Csound${PORTVERSION}.tar.gz
@ -38,7 +38,8 @@ post-build:
${ECHO} "@dirrm share/csound" >> ${PLIST}
post-patch:
${PERL} -pi -e "s:PREFIX:${PREFIX}:g" ${WRKSRC}/getstring.c
${PERL} -pi -e "s:/usr/local/lib:${PREFIX}/share/csound:g" ${WRKSRC}/getstring.c
${PERL} -pi -e "s:csound.txt:csound.dat:g" ${WRKSRC}/getstring.c
do-install:
${MKDIR} ${PREFIX}/share/csound

View File

@ -1 +1 @@
MD5 (csound/Csound4.12.tar.gz) = 7288d8ea9ad20bb82c4488f94c1aa1f8
MD5 (csound/Csound4.13.tar.gz) = 7edbfd63436a3d94b2e6312bb5b0e3b8

View File

@ -1,49 +0,0 @@
--- getstring.c.orig Sat May 13 15:52:27 2000
+++ getstring.c Wed Oct 11 18:21:07 2000
@@ -75,37 +75,37 @@
#endif
if (db==NULL)
{
- strcpy(name, "csound.txt");
- db = fopen("csound.txt", "rb");
+ strcpy(name, "csound.dat");
+ db = fopen("csound.dat", "rb");
}
if (db == NULL && argv[0] != NULL) {
strcpy(name, argv[0]);
if ((path = strrchr(name, '/')) != NULL
|| (path = strrchr(name, '\\')) != NULL) {
- strcpy(path+1, "csound.txt");
+ strcpy(path+1, "csound.dat");
db = fopen(name, "rb");
}
}
if (db == NULL && (path=getenv("SSDIR")) != NULL) {
- sprintf(name, "%s/csound.txt", path);
+ sprintf(name, "%s/csound.dat", path);
db = fopen(name, "rb");
}
if (db == NULL && (path=getenv("SFDIR")) != NULL) {
- sprintf(name, "%s/csound.txt", path);
+ sprintf(name, "%s/csound.dat", path);
db = fopen(name, "rb");
}
if (db == NULL && (path=getenv("SADIR")) != NULL) {
- sprintf(name, "%s/csound.txt", path);
+ sprintf(name, "%s/csound.dat", path);
db = fopen(name, "rb");
}
if (db == NULL) {
- strcpy(name, "/usr/local/lib/csound.txt");
- db = fopen("/usr/local/lib/csound.txt", "rb");
+ strcpy(name, "PREFIX/share/csound/csound.dat");
+ db = fopen("PREFIX/share/csound/csound.dat", "rb");
}
if (db == NULL) {
fprintf(stderr, "failed to find Strings DataBase file.\n"
"Use the CSSTRNGS environment variable or you must put the \n"
- "file \"csound.txt\" in your local, SFDIR, SADIR, SSDIR or \n"
+ "file \"csound.dat\" in your local, SFDIR, SADIR, SSDIR or \n"
"system directories for csound to work\n");
exit(1);
}