pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/54426: multimedia/mpv does not build on Darwin
>Number: 54426
>Category: pkg
>Synopsis: multimedia/mpv does not build on Darwin
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 01 14:50:01 +0000 2019
>Originator: Jonathan Schleifer
>Release: HEAD
>Organization:
>Environment:
>Description:
multimedia/mpv fails to build, apparently because it is requiring Swift 3:
<unknown>:0: error: invalid value '3' in '-swift-version 3'
<unknown>:0: note: valid arguments to '-swift-version' are '4', '4.2', '5'
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/osdep/macOS_mpv_helper.swift:148:17: warning: 'withUnsafeMutableBytes' is deprecated: use `withUnsafeMutableBytes<R>(_: (UnsafeMutableRawBufferPointer) throws -> R) rethrows -> R` instead
iccData.withUnsafeMutableBytes { (u8Ptr: UnsafeMutablePointer<UInt8>) in
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:37:30: error: 'viewWidthSizable' has been renamed to 'width'
autoresizingMask = [.viewWidthSizable, .viewHeightSizable]
^~~~~~~~~~~~~~~~
width
AppKit.NSView:21:27: note: 'viewWidthSizable' was obsoleted in Swift 4
public static var viewWidthSizable: NSView.AutoresizingMask { get }
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:37:49: error: 'viewHeightSizable' has been renamed to 'height'
autoresizingMask = [.viewWidthSizable, .viewHeightSizable]
^~~~~~~~~~~~~~~~~
height
AppKit.NSView:36:27: note: 'viewHeightSizable' was obsoleted in Swift 4
public static var viewHeightSizable: NSView.AutoresizingMask { get }
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:39:9: error: 'register(forDraggedTypes:)' has been renamed to 'registerForDraggedTypes(_:)'
register(forDraggedTypes: [NSFilenamesPboardType, NSURLPboardType])
^~~~~~~~ ~~~~~~~~~~~~~~~~~
registerForDraggedTypes
AppKit.NSView:10:15: note: 'register(forDraggedTypes:)' was obsoleted in Swift 4
open func register(forDraggedTypes newTypes: [NSPasteboard.PasteboardType])
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:39:36: error: 'NSFilenamesPboardType' is unavailable in Swift: use 'PasteboardType.fileURL'
register(forDraggedTypes: [NSFilenamesPboardType, NSURLPboardType])
^~~~~~~~~~~~~~~~~~~~~
AppKit.NSFilenamesPboardType:4:12: note: 'NSFilenamesPboardType' has been explicitly marked unavailable here
public let NSFilenamesPboardType: NSPasteboard.PasteboardType
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:39:59: error: 'NSURLPboardType' is unavailable in Swift: use 'PasteboardType.url'
register(forDraggedTypes: [NSFilenamesPboardType, NSURLPboardType])
^~~~~~~~~~~~~~~
AppKit.NSURLPboardType:4:12: note: 'NSURLPboardType' has been explicitly marked unavailable here
public let NSURLPboardType: NSPasteboard.PasteboardType
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:62:52: error: cannot call value of non-function type 'NSPasteboard'
guard let types = sender.draggingPasteboard().types else { return [] }
~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:70:43: error: cannot call value of non-function type 'NSPasteboard'
let pb = sender.draggingPasteboard()
~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:71:52: error: cannot call value of non-function type 'NSPasteboard'
guard let types = sender.draggingPasteboard().types else { return false }
~~~~~~~~~~~~~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:193:12: warning: 'fabs' is deprecated: renamed to 'abs'
if fabs(event.deltaY) >= fabs(event.deltaX) {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:193:12: note: use 'abs' instead
if fabs(event.deltaY) >= fabs(event.deltaX) {
^~~~
abs
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:193:34: warning: 'fabs' is deprecated: renamed to 'abs'
if fabs(event.deltaY) >= fabs(event.deltaX) {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:193:34: note: use 'abs' instead
if fabs(event.deltaY) >= fabs(event.deltaX) {
^~~~
abs
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:217:16: warning: 'fabs' is deprecated: renamed to 'abs'
if fabs(deltaY) >= fabs(deltaX) {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:217:16: note: use 'abs' instead
if fabs(deltaY) >= fabs(deltaX) {
^~~~
abs
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:217:32: warning: 'fabs' is deprecated: renamed to 'abs'
if fabs(deltaY) >= fabs(deltaX) {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/events_view.swift:217:32: note: use 'abs' instead
if fabs(deltaY) >= fabs(deltaX) {
^~~~
abs
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:70:29: error: 'NSWindowStyleMask' has been renamed to 'NSWindow.StyleMask'
override var styleMask: NSWindowStyleMask {
^~~~~~~~~~~~~~~~~
NSWindow.StyleMask
AppKit.NSWindowStyleMask:2:18: note: 'NSWindowStyleMask' was obsoleted in Swift 4
public typealias NSWindowStyleMask = NSWindow.StyleMask
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:70:18: error: property does not override any property from its superclass
override var styleMask: NSWindowStyleMask {
~~~~~~~~ ^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:575:10: warning: instance method 'windowShouldClose' nearly matches optional requirement 'windowShouldClose' of protocol 'NSWindowDelegate'
func windowShouldClose(_ sender: Any) -> Bool {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:575:10: note: candidate has non-matching type '(Any) -> Bool'
func windowShouldClose(_ sender: Any) -> Bool {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:575:10: note: move 'windowShouldClose' to an extension to silence this warning
func windowShouldClose(_ sender: Any) -> Bool {
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:575:10: note: make 'windowShouldClose' private to silence this warning
func windowShouldClose(_ sender: Any) -> Bool {
^
private
AppKit.NSWindowDelegate:2:19: note: requirement 'windowShouldClose' declared here
optional func windowShouldClose(_ sender: NSWindow) -> Bool
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:64:75: error: 'NSWindowButton' has been renamed to 'NSWindow.ButtonType'
get { return ([.closeButton, .miniaturizeButton, .zoomButton] as [NSWindowButton]).flatMap { standardWindowButton($0) } }
^~~~~~~~~~~~~~
NSWindow.ButtonType
AppKit.NSWindowButton:2:18: note: 'NSWindowButton' was obsoleted in Swift 4
public typealias NSWindowButton = NSWindow.ButtonType
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:64:75: error: 'NSWindowButton' has been renamed to 'NSWindow.ButtonType'
get { return ([.closeButton, .miniaturizeButton, .zoomButton] as [NSWindowButton]).flatMap { standardWindowButton($0) } }
^~~~~~~~~~~~~~
NSWindow.ButtonType
AppKit.NSWindowButton:2:18: note: 'NSWindowButton' was obsoleted in Swift 4
public typealias NSWindowButton = NSWindow.ButtonType
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:100:34: error: argument of '#selector' refers to instance method 'setHalfWindowSize()' that is not exposed to Objective-C
app.menuBar.register(#selector(setHalfWindowSize), for: MPM_H_SIZE)
^ ~~~~~~~~~~~~~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:539:10: note: add '@objc' to expose this instance method to Objective-C
func setHalfWindowSize() { setWindowScale(0.5) }
^
@objc
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:101:34: error: argument of '#selector' refers to instance method 'setNormalWindowSize()' that is not exposed to Objective-C
app.menuBar.register(#selector(setNormalWindowSize), for: MPM_N_SIZE)
^ ~~~~~~~~~~~~~~~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:538:10: note: add '@objc' to expose this instance method to Objective-C
func setNormalWindowSize() { setWindowScale(1.0) }
^
@objc
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:102:34: error: argument of '#selector' refers to instance method 'setDoubleWindowSize()' that is not exposed to Objective-C
app.menuBar.register(#selector(setDoubleWindowSize), for: MPM_D_SIZE)
^ ~~~~~~~~~~~~~~~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:540:10: note: add '@objc' to expose this instance method to Objective-C
func setDoubleWindowSize() { setWindowScale(2.0) }
^
@objc
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:119:46: error: 'viewWidthSizable' has been renamed to 'width'
titleBarEffect!.autoresizingMask = [.viewWidthSizable, .viewMinYMargin]
^~~~~~~~~~~~~~~~
width
AppKit.NSView:21:27: note: 'viewWidthSizable' was obsoleted in Swift 4
public static var viewWidthSizable: NSView.AutoresizingMask { get }
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:119:65: error: 'viewMinYMargin' has been renamed to 'minYMargin'
titleBarEffect!.autoresizingMask = [.viewWidthSizable, .viewMinYMargin]
^~~~~~~~~~~~~~
minYMargin
AppKit.NSView:31:27: note: 'viewMinYMargin' was obsoleted in Swift 4
public static var viewMinYMargin: NSView.AutoresizingMask { get }
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:153:46: error: 'NSAppearanceNameVibrantLight' has been renamed to 'NSAppearance.Name.vibrantLight'
appearance = NSAppearance(named: NSAppearanceNameVibrantLight)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSAppearance.Name.vibrantLight
AppKit.NSAppearanceNameVibrantLight:3:12: note: 'NSAppearanceNameVibrantLight' was obsoleted in Swift 3
public let NSAppearanceNameVibrantLight: NSAppearance.Name
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:157:46: error: 'NSAppearanceNameVibrantLight' has been renamed to 'NSAppearance.Name.vibrantLight'
appearance = NSAppearance(named: NSAppearanceNameVibrantLight)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSAppearance.Name.vibrantLight
AppKit.NSAppearanceNameVibrantLight:3:12: note: 'NSAppearanceNameVibrantLight' was obsoleted in Swift 3
public let NSAppearanceNameVibrantLight: NSAppearance.Name
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:161:46: error: 'NSAppearanceNameVibrantDark' has been renamed to 'NSAppearance.Name.vibrantDark'
appearance = NSAppearance(named: NSAppearanceNameVibrantDark)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
NSAppearance.Name.vibrantDark
AppKit.NSAppearanceNameVibrantDark:3:12: note: 'NSAppearanceNameVibrantDark' was obsoleted in Swift 3
public let NSAppearanceNameVibrantDark: NSAppearance.Name
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:166:46: error: 'NSAppearanceNameVibrantDark' has been renamed to 'NSAppearance.Name.vibrantDark'
appearance = NSAppearance(named: NSAppearanceNameVibrantDark)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
NSAppearance.Name.vibrantDark
AppKit.NSAppearanceNameVibrantDark:3:12: note: 'NSAppearanceNameVibrantDark' was obsoleted in Swift 3
public let NSAppearanceNameVibrantDark: NSAppearance.Name
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:188:80: error: argument of '#selector' refers to instance method 'hideTitleBar()' that is not exposed to Objective-C
NSObject.cancelPreviousPerformRequests(withTarget: self, selector: #selector(hideTitleBar), object: nil)
^ ~~~~~~~~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:192:10: note: add '@objc' to expose this instance method to Objective-C
func hideTitleBar() {
^
@objc
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:209:60: error: argument of '#selector' refers to instance method 'hideTitleBar()' that is not exposed to Objective-C
selector: #selector(hideTitleBar),
^ ~~~~~~~~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:192:10: note: add '@objc' to expose this instance method to Objective-C
func hideTitleBar() {
^
@objc
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:211:17: error: argument of '#selector' refers to instance method 'hideTitleBar()' that is not exposed to Objective-C
perform(#selector(hideTitleBar), with: nil, afterDelay: 0.5)
^ ~~~~~~~~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:192:10: note: add '@objc' to expose this instance method to Objective-C
func hideTitleBar() {
^
@objc
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:359:29: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = Int(CGWindowLevelForKey(.floatingWindow))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:361:68: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = Int(CGWindowLevelForKey(.statusWindow))+1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:363:40: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = ontopLevel as! Int
~~~~~~~~~~~^~~~~~~
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:368:29: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = Int(CGWindowLevelForKey(.floatingWindow))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:370:68: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = Int(CGWindowLevelForKey(.statusWindow))+1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:372:55: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = Int(ontopLevel as! String)!
~~~~~~~~~~~~~~~~~~~~~~~~~~^
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:378:21: error: cannot assign value of type 'Int' to type 'NSWindow.Level'
level = Int(CGWindowLevelForKey(.normalWindow))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSWindow.Level(rawValue: )
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa-cb/window.swift:508:62: error: cannot call value of non-function type 'NSScreen?'
let ts: NSScreen = tScreen ?? screen ?? NSScreen.main()!
~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:308:41: error: expression type 'NSScreen?' is ambiguous without more context
let displayID = (ccb.window.screen!.deviceDescription["NSScreenNumber"] as! NSNumber).intValue
~~~~~~~~~~~^~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:96:81: error: cannot call value of non-function type 'NSScreen?'
let targetScreen = getScreenBy(id: Int(opts.screen_id)) ?? NSScreen.main()
~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:124:81: error: cannot call value of non-function type 'NSScreen?'
let targetScreen = getScreenBy(id: Int(opts.screen_id)) ?? NSScreen.main()
~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:153:75: error: cannot call value of non-function type 'NSScreen?'
let screen = getScreenBy(id: Int(opts.screen_id)) ?? NSScreen.main()
~~~~~~~~~~~~~^~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:176:39: error: expression type 'NSScreen?' is ambiguous without more context
let displayId = UInt32(window.screen!.deviceDescription["NSScreenNumber"] as! Int)
~~~~~~~^~~~~~
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:257:29: warning: 'init(_:)' is deprecated: replaced by 'init(truncating:)'
let lux = Int(ceil( Double((term4 + term3 + term2 + term1 - 0.19) as NSNumber)))
^
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:257:29: note: use 'init(truncating:)' instead
let lux = Int(ceil( Double((term4 + term3 + term2 + term1 - 0.19) as NSNumber)))
^
truncating:
/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/video/out/cocoa_cb_common.swift:337:39: error: cannot call value of non-function type '[NSScreen]'
let screens = NSScreen.screens()
~~~~~~~~~~~~~~~~^~
Waf: Leaving directory `/Users/js/Devel/pkgsrc/multimedia/mpv/work/mpv-0.29.1/build'
Build failed
-> task in 'osdep/macOS_swift.o osdep/macOS_swift.h osdep/macOS_swift.swiftmodule' failed with exit status 1 (run with -v to display more information)
*** Error code 1
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index