diff options
author | minskim <minskim@pkgsrc.org> | 2004-09-12 05:08:28 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2004-09-12 05:08:28 +0000 |
commit | b305681ed99c15756363b71feb61382d9283ef41 (patch) | |
tree | f2ecdcd4e45453f370303ce79c920ca233de9767 /audio/mserv | |
parent | 32a5a6a6cf9a575e5844a063aa84d5ac949c6d1a (diff) | |
download | pkgsrc-b305681ed99c15756363b71feb61382d9283ef41.tar.gz |
Make this package build on Linux by using strncpy() when strlcpy() is
not available.
Diffstat (limited to 'audio/mserv')
-rw-r--r-- | audio/mserv/distinfo | 7 | ||||
-rw-r--r-- | audio/mserv/patches/patch-af | 56 | ||||
-rw-r--r-- | audio/mserv/patches/patch-ah | 13 | ||||
-rw-r--r-- | audio/mserv/patches/patch-ai | 13 | ||||
-rw-r--r-- | audio/mserv/patches/patch-aj | 14 |
5 files changed, 77 insertions, 26 deletions
diff --git a/audio/mserv/distinfo b/audio/mserv/distinfo index 57e33367b7f..1988032f0c7 100644 --- a/audio/mserv/distinfo +++ b/audio/mserv/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2004/02/20 00:41:16 abs Exp $ +$NetBSD: distinfo,v 1.17 2004/09/12 05:08:28 minskim Exp $ SHA1 (mserv-0.35.tar.gz) = 850835946e4d5a0deccdd22a18f30170c0a7b57c Size (mserv-0.35.tar.gz) = 280299 bytes @@ -7,5 +7,8 @@ SHA1 (patch-ab) = 91d6840eae30182343db97d3f67d23d0c423dbe7 SHA1 (patch-ac) = 068b14b4a8a0ce4dcb19e0cd28fc6a7296f86dad SHA1 (patch-ad) = 105edf313c2101f0961aab8a94022a5a0d07eb22 SHA1 (patch-ae) = 559f2ecf11bcd25b5ea3423dff4b1a4bf4066b78 -SHA1 (patch-af) = ea56ea4f0c7f807484ff9e75f798fea7f3335df3 +SHA1 (patch-af) = d92f0bf56a04cf3b2f7001c4f68c1bb1b5ea007f SHA1 (patch-ag) = 7d5fae48c89db4b9bdccf371528c3b3e890455a9 +SHA1 (patch-ah) = c089ae56f23c83291a1e9b5502b952cd58be4860 +SHA1 (patch-ai) = 2a0adae9f5ad8810960dc4e4fecf1e03633f0421 +SHA1 (patch-aj) = 445d110b1a820909b940b5c036de13a2679b064c diff --git a/audio/mserv/patches/patch-af b/audio/mserv/patches/patch-af index a6fecfef01b..561d97edb98 100644 --- a/audio/mserv/patches/patch-af +++ b/audio/mserv/patches/patch-af @@ -1,6 +1,6 @@ -$NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ +$NetBSD: patch-af,v 1.9 2004/09/12 05:08:28 minskim Exp $ ---- mserv/mserv.c.orig Sun Aug 3 15:57:20 2003 +--- mserv/mserv.c.orig 2003-08-03 09:57:20.000000000 -0500 +++ mserv/mserv.c @@ -62,12 +62,17 @@ met: #include <sys/ioctl.h> @@ -21,7 +21,18 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ #include "defconf.h" #include "conf.h" #include "opt.h" -@@ -131,7 +136,8 @@ static void mserv_vresponse(t_client *cl +@@ -79,6 +84,10 @@ met: + # define MIN(X,Y) (((X) < (Y)) ? (X) : (Y)) + #endif + ++#ifndef HAVE_STRLCPY ++#define strlcpy strncpy ++#endif ++ + extern char *optarg; + extern int optind; + /* extern int getopt(int, char *const *, const char *); */ /* sunos ;( */ +@@ -131,7 +140,8 @@ static void mserv_vresponse(t_client *cl static void mserv_scandir(void); static void mserv_scandir_recurse(const char *pathname); static t_track *mserv_loadtrk(const char *filename); @@ -31,7 +42,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ static int album_insertsort(t_album *album); static t_author *mserv_authorlist(void); static int author_insertsort(t_author **list, t_author *author); -@@ -292,7 +298,7 @@ int main(int argc, char *argv[]) +@@ -292,7 +302,7 @@ int main(int argc, char *argv[]) ps->pw_dir[strlen(ps->pw_dir)-1] == '/' ? "" : "/"); } else { /* copy out of environment */ @@ -40,7 +51,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ fprintf(stderr, "%s: out of memory\n", progname); exit(1); } -@@ -305,7 +311,7 @@ int main(int argc, char *argv[]) +@@ -305,7 +315,7 @@ int main(int argc, char *argv[]) l--; mserv_root[l] = '\0'; if (!mserv_conf) { @@ -49,7 +60,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ fprintf(stderr, "%s: out of memory\n", progname); exit(1); } -@@ -1624,6 +1630,7 @@ static void mserv_scandir_recurse(const +@@ -1624,6 +1634,7 @@ static void mserv_scandir_recurse(const int i; t_album *album; int flag = 0; @@ -57,7 +68,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ /* pathname is "" or "directory/" or "directory/directory/..." */ -@@ -1686,22 +1693,32 @@ static void mserv_scandir_recurse(const +@@ -1686,22 +1697,32 @@ static void mserv_scandir_recurse(const toomany = 1; break; } @@ -91,7 +102,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ return; qsort(tracks, TRACKSPERALBUM, sizeof(t_track *), mserv_trackcompare_filename); -@@ -1815,7 +1832,7 @@ static int mserv_trackcompare_rating(con +@@ -1815,7 +1836,7 @@ static int mserv_trackcompare_rating(con } } @@ -100,7 +111,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ { FILE *fd; char fullpath[MAXFNAME]; -@@ -1899,8 +1916,13 @@ static t_album *mserv_loadalbum(const ch +@@ -1899,8 +1920,13 @@ static t_album *mserv_loadalbum(const ch return NULL; mtime = time(NULL); } @@ -116,7 +127,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ if (!*name) { if (!*filename || !*(filename+1)) { strcpy(name, "rootdir"); -@@ -2019,11 +2041,13 @@ static t_track *mserv_loadtrk(const char +@@ -2019,11 +2045,13 @@ static t_track *mserv_loadtrk(const char alen = strlen(buffer); if (buffer[alen-1] != '\n') { mserv_log("Line %d too long in '%s'", line, fullpath_trk); @@ -130,7 +141,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ return NULL; } strncpy(token, buffer, l); -@@ -2059,6 +2083,7 @@ static t_track *mserv_loadtrk(const char +@@ -2059,6 +2087,7 @@ static t_track *mserv_loadtrk(const char } if ((arate = malloc(sizeof(t_rating)+strlen(token)+1)) == NULL) { mserv_log("Out of memory creating ratings for '%s'", fullpath_trk); @@ -138,7 +149,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ return NULL; } memset(arate, 0, sizeof(t_rating)); -@@ -2082,15 +2107,18 @@ static t_track *mserv_loadtrk(const char +@@ -2082,15 +2111,18 @@ static t_track *mserv_loadtrk(const char } if (!*author) { mserv_log("No author specified in '%s'", fullpath_trk); @@ -157,7 +168,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ return NULL; } mtime = buf.st_mtime; -@@ -2098,8 +2126,17 @@ static t_track *mserv_loadtrk(const char +@@ -2098,8 +2130,17 @@ static t_track *mserv_loadtrk(const char } if (duration == 0 && !*miscinfo) { len = strlen(fullpath_file); @@ -175,7 +186,7 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ if (duration == -1) { mserv_log("Unable to determine details of mp3 '%s': %s", filename, strerror(errno)); -@@ -2719,7 +2756,7 @@ t_album *mserv_checkdisk_album(t_album * +@@ -2719,7 +2760,7 @@ t_album *mserv_checkdisk_album(t_album * } if (buf.st_mtime == album->mtime) return album; @@ -184,13 +195,10 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ mserv_log("Unable to re-load '%s'", album->filename); return album; } -@@ -3427,6 +3464,62 @@ int mserv_setmixer(t_client *cl, int wha - close(mixer_fd); - mserv_response(cl, "NAN", NULL); - return -1; -+} -+ -+#endif +@@ -3430,3 +3471,59 @@ int mserv_setmixer(t_client *cl, int wha + } + + #endif + +#ifdef PARSE_OGG_INFO +int mserv_ogginfo_readlen(const char *fname, int *bitrate_ret, @@ -244,6 +252,6 @@ $NetBSD: patch-af,v 1.8 2004/02/20 00:41:16 abs Exp $ + ov_clear(&vf); + fclose(f); + return (int)duration * 100; - } - - #endif ++} ++ ++#endif diff --git a/audio/mserv/patches/patch-ah b/audio/mserv/patches/patch-ah new file mode 100644 index 00000000000..e4dc0f88853 --- /dev/null +++ b/audio/mserv/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.6 2004/09/12 05:08:28 minskim Exp $ + +--- configure.ac.orig 2003-08-03 09:57:19.000000000 -0500 ++++ configure.ac +@@ -90,7 +90,7 @@ dnl Checks for typedefs, structures, and + + dnl Checks for functions + +- AC_CHECK_FUNCS(strsep) ++ AC_CHECK_FUNCS(strsep strlcpy) + + dnl Engine selection + diff --git a/audio/mserv/patches/patch-ai b/audio/mserv/patches/patch-ai new file mode 100644 index 00000000000..12b4f594a49 --- /dev/null +++ b/audio/mserv/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.5 2004/09/12 05:08:28 minskim Exp $ + +--- configure.orig 2003-08-03 09:57:19.000000000 -0500 ++++ configure +@@ -9316,7 +9316,7 @@ esac + + + +-for ac_func in strsep ++for ac_func in strsep strlcpy + do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` + echo "$as_me:$LINENO: checking for $ac_func" >&5 diff --git a/audio/mserv/patches/patch-aj b/audio/mserv/patches/patch-aj new file mode 100644 index 00000000000..8aea4276206 --- /dev/null +++ b/audio/mserv/patches/patch-aj @@ -0,0 +1,14 @@ +$NetBSD: patch-aj,v 1.5 2004/09/12 05:08:28 minskim Exp $ + +--- config.h.in.orig 2003-08-03 09:57:19.000000000 -0500 ++++ config.h.in +@@ -27,6 +27,9 @@ + /* Define to 1 if you have the `strsep' function. */ + #undef HAVE_STRSEP + ++/* Define to 1 if you have the `strlcpy' function. */ ++#undef HAVE_STRLCPY ++ + /* Define to 1 if you have the <sys/soundcard.h> header file. */ + #undef HAVE_SYS_SOUNDCARD_H + |