pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/54442: sysutils/dvdrecord failed to build on darwin macOS
>Number: 54442
>Category: pkg
>Synopsis: sysutils/dvdrecord failed to build on darwin macOS
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Aug 06 11:05:00 +0000 2019
>Originator: clement bouvier
>Release: current
>Organization:
>Environment:
macOS Mojave 10.14.6
>Description:
sysutils/dvdrecord failed to build.
An example of failed build is available here:
http://us-east.manta.joyent.com/pkgsrc/public/reports/Darwin/trunk/x86_64/20190802.0934/dvdrecord-0.1.5nb2/build.log
>How-To-Repeat:
Build sysutils/dvdrecord on darwin.
>Fix:
The IOKit headers has changed along the version of macosx about scsi.
Add Corfoundation and IOKitLib frameworks options to the linker.
MacOS does not support the realtime threads scheduling.
The patch changes:
- the IOKit headers locations according the version of macos.
- dvdrecord needs a linking on IOKit and CoreFoundation frameworks.
- It also forces to check that the value of _POSIX_PRIORITY_SCHEDULING is -1 as open group specifies if the option is supported.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/dvdrecord/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile 23 Oct 2012 19:50:59 -0000 1.19
+++ Makefile 6 Aug 2019 10:58:04 -0000
@@ -2,7 +2,7 @@
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"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/dvdrecord/distinfo,v
retrieving revision 1.8
diff -u -r1.8 distinfo
--- distinfo 4 Nov 2015 01:32:12 -0000 1.8
+++ distinfo 6 Aug 2019 10:58:04 -0000
@@ -7,3 +7,5 @@
SHA1 (patch-aa) = 6463dd7852df43089724976c75a24ea41d9a66bc
SHA1 (patch-ab) = 39b5cf16f3f1c8d191b0de6b25ff8bb2c5eba2da
SHA1 (patch-ac) = 4fe2505adb6ac24a859dc88cc86f91e9bf28f7da
+SHA1 (patch-cdrecord_cdrecord.c) = 312245a5db7060b326002e4552703ccabc8a8ed8
+SHA1 (patch-libscg_scsi-mac-iokit.c) = a6f04eb9520952f72fd34a1ca57c6a4684f6c80d
Index: patches/patch-cdrecord_cdrecord.c
===================================================================
RCS file: patches/patch-cdrecord_cdrecord.c
diff -N patches/patch-cdrecord_cdrecord.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cdrecord_cdrecord.c 6 Aug 2019 10:58:04 -0000
@@ -0,0 +1,15 @@
+$NetBSD$
+
+- _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.
Index: patches/patch-libscg_scsi-mac-iokit.c
===================================================================
RCS file: patches/patch-libscg_scsi-mac-iokit.c
diff -N patches/patch-libscg_scsi-mac-iokit.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-libscg_scsi-mac-iokit.c 6 Aug 2019 10:58:04 -0000
@@ -0,0 +1,29 @@
+$NetBSD$
+
+- 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