Fix build on SunOS.diff -r1.16 -r1.17 pkgsrc/audio/moc/Makefile
(hans)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.16 2011/04/22 13:42:56 obache Exp $ | 1 | # $NetBSD: Makefile,v 1.17 2012/01/11 19:06:24 hans Exp $ | |
2 | 2 | |||
3 | DISTNAME= moc-2.4.3 | 3 | DISTNAME= moc-2.4.3 | |
4 | PKGREVISION= 3 | 4 | PKGREVISION= 3 | |
5 | CATEGORIES= audio | 5 | CATEGORIES= audio | |
6 | MASTER_SITES= ftp://ftp.daper.net/pub/soft/moc/stable/ | 6 | MASTER_SITES= ftp://ftp.daper.net/pub/soft/moc/stable/ | |
7 | EXTRACT_SUFX= .tar.bz2 | 7 | EXTRACT_SUFX= .tar.bz2 | |
8 | 8 | |||
9 | MAINTAINER= peter.schuller@infidyne.com | 9 | MAINTAINER= peter.schuller@infidyne.com | |
10 | HOMEPAGE= http://moc.daper.net/ | 10 | HOMEPAGE= http://moc.daper.net/ | |
11 | COMMENT= Curses based console audio player | 11 | COMMENT= Curses based console audio player | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
@@ -28,20 +28,27 @@ SUBST_STAGE.oss= pre-configure | @@ -28,20 +28,27 @@ SUBST_STAGE.oss= pre-configure | |||
28 | SUBST_FILES.oss= config.example options.c | 28 | SUBST_FILES.oss= config.example options.c | |
29 | SUBST_SED.oss= -e s,/dev/dsp,${DEVOSSAUDIO},g | 29 | SUBST_SED.oss= -e s,/dev/dsp,${DEVOSSAUDIO},g | |
30 | SUBST_MESSAGE.oss= Fixing hardcoded audio device. | 30 | SUBST_MESSAGE.oss= Fixing hardcoded audio device. | |
31 | 31 | |||
32 | .include "options.mk" | 32 | .include "options.mk" | |
33 | ### | 33 | ### | |
34 | ### This target is [currently] for regenerating configure to add the | 34 | ### This target is [currently] for regenerating configure to add the | |
35 | ### sched_get_priority_max check of librt. | 35 | ### sched_get_priority_max check of librt. | |
36 | ### | 36 | ### | |
37 | #USE_TOOLS+= autoconf automake | 37 | #USE_TOOLS+= autoconf automake | |
38 | #pre-configure: | 38 | #pre-configure: | |
39 | # cd ${WRKSRC} && autoreconf -v -i | 39 | # cd ${WRKSRC} && autoreconf -v -i | |
40 | 40 | |||
41 | .include "../../mk/bsd.prefs.mk" | |||
42 | .if ${OPSYS} == "SunOS" | |||
43 | BUILDLINK_TRANSFORM+= rm:-Wl,--export-dynamic | |||
44 | .endif | |||
45 | ||||
46 | LIBS.SunOS+= -lsocket | |||
47 | ||||
41 | .include "../../audio/libid3tag/buildlink3.mk" | 48 | .include "../../audio/libid3tag/buildlink3.mk" | |
42 | .include "../../audio/libmad/buildlink3.mk" | 49 | .include "../../audio/libmad/buildlink3.mk" | |
43 | .include "../../devel/gettext-lib/buildlink3.mk" | 50 | .include "../../devel/gettext-lib/buildlink3.mk" | |
44 | .include "../../devel/ncurses/buildlink3.mk" | 51 | .include "../../devel/ncurses/buildlink3.mk" | |
45 | .include "../../mk/oss.buildlink3.mk" | 52 | .include "../../mk/oss.buildlink3.mk" | |
46 | .include "../../mk/pthread.buildlink3.mk" | 53 | .include "../../mk/pthread.buildlink3.mk" | |
47 | .include "../../mk/bsd.pkg.mk" | 54 | .include "../../mk/bsd.pkg.mk" |
@@ -1,8 +1,9 @@ | @@ -1,8 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.7 2011/09/04 14:31:58 joerg Exp $ | 1 | $NetBSD: distinfo,v 1.8 2012/01/11 19:06:24 hans Exp $ | |
2 | 2 | |||
3 | SHA1 (moc-2.4.3.tar.bz2) = d9b54636f51f5366e94b684ddff3e869b1c634ac | 3 | SHA1 (moc-2.4.3.tar.bz2) = d9b54636f51f5366e94b684ddff3e869b1c634ac | |
4 | RMD160 (moc-2.4.3.tar.bz2) = 34470535b16ab329a9055b05550028ceb0a860f7 | 4 | RMD160 (moc-2.4.3.tar.bz2) = 34470535b16ab329a9055b05550028ceb0a860f7 | |
5 | Size (moc-2.4.3.tar.bz2) = 459706 bytes | 5 | Size (moc-2.4.3.tar.bz2) = 459706 bytes | |
6 | SHA1 (patch-ab) = 91c80cc251cd1c245613e3c41907629a7934bda3 | 6 | SHA1 (patch-ab) = 91c80cc251cd1c245613e3c41907629a7934bda3 | |
7 | SHA1 (patch-ac) = d8c11caf51841021bc3d9999e1454922e89a370c | 7 | SHA1 (patch-ac) = d8c11caf51841021bc3d9999e1454922e89a370c | |
8 | SHA1 (patch-ad) = 9a242fdc116fa173354d4ebd93d624c8c4580b6a | 8 | SHA1 (patch-ad) = 9a242fdc116fa173354d4ebd93d624c8c4580b6a | |
9 | 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;