pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/dvdrecord dvdread: fix build on darwin.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7b084977100e
branches:  trunk
changeset: 338074:7b084977100e
user:      maya <maya%pkgsrc.org@localhost>
date:      Sun Aug 18 07:19:47 2019 +0000

description:
dvdread: fix build on darwin.

XXX: I'm not sure that Darwin is reading the POSIX recommendations correctly
in defining _POSIX_PRIORITY_SCHEDULING to -1.

>From clement bouvier in PR pkg/54442.

diffstat:

 sysutils/dvdrecord/Makefile                              |   5 +-
 sysutils/dvdrecord/distinfo                              |   4 +-
 sysutils/dvdrecord/patches/patch-cdrecord_cdrecord.c     |  15 ++++++++
 sysutils/dvdrecord/patches/patch-libscg_scsi-mac-iokit.c |  29 ++++++++++++++++
 4 files changed, 50 insertions(+), 3 deletions(-)

diffs (89 lines):

diff -r f96363e43f10 -r 7b084977100e sysutils/dvdrecord/Makefile
--- a/sysutils/dvdrecord/Makefile       Sun Aug 18 07:10:32 2019 +0000
+++ b/sysutils/dvdrecord/Makefile       Sun Aug 18 07:19:47 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.19 2012/10/23 19:50:59 asau Exp $
+# $NetBSD: Makefile,v 1.20 2019/08/18 07:19:47 maya Exp $
 
 DISTNAME=      dvdrtools-${VERSION}
 PKGNAME=       ${DISTNAME:S/dvdrtools/dvdrecord/}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    sysutils
 MASTER_SITES=  http://freesoftware.fsf.org/download/dvdrtools/dvdrtools.pkg/${VERSION}/
 EXTRACT_SUFX=  .tar.bz2
@@ -17,6 +17,7 @@
 # Override wrong usage of AC_DEFINE_UNQUOTED:
 CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
 LIBS.SunOS+=           -lsocket
+LIBS.Darwin+=          -framework IOKit -framework CoreFoundation
 INSTALLATION_DIRS+=    bin ${PKGMANDIR}/man1
 
 .include "../../mk/bsd.prefs.mk"
diff -r f96363e43f10 -r 7b084977100e sysutils/dvdrecord/distinfo
--- a/sysutils/dvdrecord/distinfo       Sun Aug 18 07:10:32 2019 +0000
+++ b/sysutils/dvdrecord/distinfo       Sun Aug 18 07:19:47 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2015/11/04 01:32:12 agc Exp $
+$NetBSD: distinfo,v 1.9 2019/08/18 07:19:47 maya Exp $
 
 SHA1 (dvdrtools-0.1.5.tar.bz2) = 7cab32797e10ca7ddfab226c4463a1d275fe513b
 RMD160 (dvdrtools-0.1.5.tar.bz2) = ca39253f7bc553b147dadce1c608f577e97fe320
@@ -7,3 +7,5 @@
 SHA1 (patch-aa) = 6463dd7852df43089724976c75a24ea41d9a66bc
 SHA1 (patch-ab) = 39b5cf16f3f1c8d191b0de6b25ff8bb2c5eba2da
 SHA1 (patch-ac) = 4fe2505adb6ac24a859dc88cc86f91e9bf28f7da
+SHA1 (patch-cdrecord_cdrecord.c) = 66aa5115b84e74f00f05837b21ee12ce14477276
+SHA1 (patch-libscg_scsi-mac-iokit.c) = 791fede1a5b82ed1a484b6176030d702842ada7f
diff -r f96363e43f10 -r 7b084977100e sysutils/dvdrecord/patches/patch-cdrecord_cdrecord.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dvdrecord/patches/patch-cdrecord_cdrecord.c      Sun Aug 18 07:19:47 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-cdrecord_cdrecord.c,v 1.1 2019/08/18 07:19:47 maya Exp $
+
+- _POSIX_PRIORITY_SCHEDULING is set to -1 if options is not supported (like on darwin)
+
+--- cdrecord/cdrecord.c.orig   2003-06-12 19:05:46.000000000 +0000
++++ cdrecord/cdrecord.c
+@@ -2935,7 +2935,7 @@ EXPORT   void raisepri(int pri)
+ 
+ #else /* HAVE_SYS_PRIOCNTL_H */
+ 
+-#if defined(_POSIX_PRIORITY_SCHEDULING)
++#if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING != (-1))
+ /*
+  * XXX Ugly but needed because of a typo in /usr/iclude/sched.h on Linux.
+  * XXX This should be removed as soon as we are sure that Linux-2.0.29 is gone.
diff -r f96363e43f10 -r 7b084977100e sysutils/dvdrecord/patches/patch-libscg_scsi-mac-iokit.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/dvdrecord/patches/patch-libscg_scsi-mac-iokit.c  Sun Aug 18 07:19:47 2019 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-libscg_scsi-mac-iokit.c,v 1.1 2019/08/18 07:19:47 maya Exp $
+
+- IOkit header location location changes with the macos version.
+  IOKit/scsi from macosx Snow Leopard.
+
+--- libscg/scsi-mac-iokit.c.orig       2002-01-29 17:23:22.000000000 +0000
++++ libscg/scsi-mac-iokit.c
+@@ -50,12 +50,21 @@ LOCAL      char    _scg_trans_version[] = "scsi-
+ #define       MAX_TGT         16
+ #define       MAX_LUN         8
+ 
++#include <AvailabilityMacros.h>
+ #include <statdefs.h>
+ #include <mach/mach.h>
+ #include <Carbon/Carbon.h>
+ #include <IOKit/IOKitLib.h>
+ #include <IOKit/IOCFPlugIn.h>
++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
++#define COLLISION_VERSION VERSION
++#undef VERSION
++#include <IOKit/scsi/SCSITaskLib.h>
++#define VERSION COLLISION_VERSION
++#undef COLLISION_VERSION
++#else
+ #include <IOKit/scsi-commands/SCSITaskLib.h>
++#endif
+ #include <mach/mach_error.h>
+ 
+ struct scg_local {



Home | Main Index | Thread Index | Old Index