Wed Jan 11 19:06:25 2012 UTC ()
Fix build on SunOS.
(hans)
diff -r1.16 -r1.17 pkgsrc/audio/moc/Makefile
diff -r1.7 -r1.8 pkgsrc/audio/moc/distinfo
diff -r0 -r1.1 pkgsrc/audio/moc/patches/patch-playlist__file.c
--- pkgsrc/audio/moc/Makefile 2011/04/22 13:42:56 1.16
+++ pkgsrc/audio/moc/Makefile 2012/01/11 19:06:24 1.17
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.16 2011/04/22 13:42:56 obache Exp $
+# $NetBSD: Makefile,v 1.17 2012/01/11 19:06:24 hans Exp $
DISTNAME= moc-2.4.3
PKGREVISION= 3
@@ -37,6 +37,13 @@
#USE_TOOLS+= autoconf automake
#pre-configure:
# cd ${WRKSRC} && autoreconf -v -i
+
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} == "SunOS"
+BUILDLINK_TRANSFORM+= rm:-Wl,--export-dynamic
+.endif
+
+LIBS.SunOS+= -lsocket
.include "../../audio/libid3tag/buildlink3.mk"
.include "../../audio/libmad/buildlink3.mk"
--- pkgsrc/audio/moc/distinfo 2011/09/04 14:31:58 1.7
+++ pkgsrc/audio/moc/distinfo 2012/01/11 19:06:24 1.8
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2011/09/04 14:31:58 joerg Exp $
+$NetBSD: distinfo,v 1.8 2012/01/11 19:06:24 hans Exp $
SHA1 (moc-2.4.3.tar.bz2) = d9b54636f51f5366e94b684ddff3e869b1c634ac
RMD160 (moc-2.4.3.tar.bz2) = 34470535b16ab329a9055b05550028ceb0a860f7
@@ -6,3 +6,4 @@
SHA1 (patch-ab) = 91c80cc251cd1c245613e3c41907629a7934bda3
SHA1 (patch-ac) = d8c11caf51841021bc3d9999e1454922e89a370c
SHA1 (patch-ad) = 9a242fdc116fa173354d4ebd93d624c8c4580b6a
+SHA1 (patch-playlist__file.c) = 1026a40068a75e5076d3b6d661e5c47f7f0a418e
$NetBSD: patch-playlist__file.c,v 1.1 2012/01/11 19:06:25 hans Exp $
--- playlist_file.c.orig 2007-07-30 16:58:46.000000000 +0200
+++ playlist_file.c 2011-12-30 17:36:48.654368031 +0100
@@ -91,8 +91,10 @@ static int plist_load_m3u (struct plist
return 0;
}
+#ifndef __sun
if (flock(fileno(file), LOCK_SH) == -1)
logit ("Can't flock() the playlist file: %s", strerror(errno));
+#endif
while ((line = read_line(file))) {
if (!strncmp(line, "#EXTINF:", sizeof("#EXTINF:")-1)) {
@@ -190,9 +192,12 @@ static int plist_load_m3u (struct plist
free (line);
}
+#ifndef __sun
if (flock(fileno(file), LOCK_UN) == -1)
logit ("Can't flock() (unlock) the playlist file: %s",
strerror(errno));
+#endif
+
fclose (file);
return added;
@@ -432,8 +437,10 @@ static int plist_save_m3u (struct plist
return 0;
}
+#ifndef __sun
if (flock(fileno(file), LOCK_EX) == -1)
logit ("Can't flock() the playlist file: %s", strerror(errno));
+#endif
if (fprintf(file, "#EXTM3U\r\n") < 0) {
error ("Error writing playlist: %s", strerror(errno));
@@ -481,9 +488,12 @@ static int plist_save_m3u (struct plist
}
}
+#ifndef __sun
if (flock(fileno(file), LOCK_UN) == -1)
logit ("Can't flock() (unlock) the playlist file: %s",
strerror(errno));
+#endif
+
if (fclose(file)) {
error ("Error writing playlist: %s", strerror(errno));
return 0;