Ticket #54581: NicePlayer-0.98.diff

File NicePlayer-0.98.diff, 5.8 KB (added by ryandesign (Ryan Carsten Schmidt), 6 years ago)

work in progress

  • Portfile

     
    1 PortSystem 1.0
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    22
    3 name                NicePlayer
    4 version             0.95
    5 revision            1
     3PortSystem          1.0
     4PortGroup           github 1.0
     5PortGroup           xcode 1.0
     6
     7github.setup        jbtule NicePlayer 0.98
    68categories          aqua multimedia
    7 platforms           macosx
    8 maintainers         nomaintainer
    9 homepage            http://niceplayer.sourceforge.net
    10 description         Multi-engine Fullscreen Video Player
    11 long_description    This program aims to be a Video player designed for \
    12                     playing movies nicely for a person who likes to watch or \
    13                     present movies on their computer (such as the casual \
    14                     viewer or the video artist). This program features full \
    15                     screen or border-less floating windows, convenient \
    16                     controls for scrubbing or queuing movies, and on the \
    17                     fly playlist creation.
     9maintainers         {ryandesign @ryandesign} openmaintainer
     10license             {MPL-1.1 GPL-2+ LGPL-2.1+}
    1811
    19 master_sites        sourceforge:niceplayer
    20 distname            ${name}_source_${version}
    21 checksums           sha1 3f59c9c501eb94223e972df26758a55bbe8ea26d
    22 use_bzip2           yes
    23 extract.suffix      .tbz2
     12description         fullscreen, borderless multi-engine player
    2413
     14long_description    This program aims to be a multi-engine player player \
     15                    designed for playing movies nicely for a person who likes \
     16                    to watch or present movies on their computer (such as the \
     17                    casual viewer or the video artist). This program features \
     18                    full screen or border-less floating windows, convenient \
     19                    controls for scrubbing or queuing movies, and on-the-fly \
     20                    playlist creation.
     21
     22# Building for i386 fails.
     23# https://github.com/jbtule/NicePlayer/issues/8
     24supported_archs     x86_64
     25
     26# Uses submodules and does not offer a full source code download.
     27# https://github.com/jbtule/NicePlayer/issues/6
     28fetch.type          git
     29post-fetch {
     30    system -W ${worksrcpath} "git submodule update --init"
     31}
     32
     33patchfiles-append   sdp.patch
     34
     35# Uses Sparkle and doesn't offer a way to fully disable it.
     36# https://github.com/jbtule/NicePlayer/issues/4
     37depends_lib-append  path:lib/libssl.dylib:openssl
     38patchfiles-append   no-sparkle.patch
    2539post-patch {
    26                     # Remove subversion version extraction while build.
    27                     # Needs to be updated with every release of the port or
    28                     # the automatic updater will not work!
    29                     # The number stored here is the subversion revision.
    30                     reinplace "s|REV=.*|REV=514|g" \
    31                       ${worksrcpath}/niceplayer/Versioning/version.sh
     40    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Libraries/sparkle/Sparkle.xcodeproj/project.pbxproj
    3241}
    3342
    34 use_configure       no
    35 build.type          pbx
    36 build.dir           ${workpath}/${name}_source_${version}/niceplayer
    37 build.target        -configuration Release
    38 build.args          build -project ${name}.xcodeproj SYMROOT=${workpath}/build
     43xcode.configuration Release
    3944
    40 pre-destroot {
    41   # Rename the following files because of a bug in macports which fails to
    42   # uninstall files containg { or }; Ticket #12420
    43   set scripts "${workpath}/build/Release/${name}.app/Contents/Resources/Default Scripts"
    44  
    45   file rename "${scripts}/01 Stretch Aspect Ratio/01 To 16-9 {^*L}.scpt" \
    46     "${scripts}/01 Stretch Aspect Ratio/01 To 16-9  ⁅^*L⁆.scpt"
    47   file rename "${scripts}/01 Stretch Aspect Ratio/01 To 4-3 {^*K}.scpt" \
    48     "${scripts}/01 Stretch Aspect Ratio/01 To 4-3 ⁅^*K⁆.scpt"
    49  
    50   file rename "${scripts}/02 Time Control/Go To Time...{^*G}.scpt" \
    51     "${scripts}/02 Time Control/Go To Time...⁅^*G⁆.scpt"
    52   file rename "${scripts}/02 Time Control/Title Sequence (Approx) Jump {^*J}.scpt" \
    53     "${scripts}/02 Time Control/Title Sequence (Approx) Jump⁅^*J⁆.scpt"
    54  
    55   file rename "${scripts}/98 Just For Fun/Send to Background {^*B}.scpt" \
    56     "${scripts}/02 Time Control/Send to Background ⁅^*B⁆.scpt"
    57   file rename "${scripts}/98 Just For Fun/Set Current Window Transparency {^*T}.scpt" \
    58     "${scripts}/02 Time Control/Set Current Window Transparency ⁅^*T⁆.scpt"
     45# Do not set INSTALL_PATH as this breaks the app's ability to link to the embedded frameworks.
     46xcode.destroot.type
     47
     48# Uses QuickTime.h which Apple removed in the macOS 10.12 SDK.
     49# https://github.com/jbtule/NicePlayer/issues/5
     50if {[vercmp ${configure.sdk_version} 10.11] > 0} {
     51    configure.sdk_version 10.11
     52    # Needs my MacOSX.sdk port and support for it in MacPorts base.
     53    if no {
     54        configure.sdkroot ${prefix}/Developer/SDKs/MacOSX${configure.sdk_version}.sdk
     55    }
    5956}
    6057
    61 destroot {
    62                     xinstall -m 755 -d ${destroot}/Applications/MacPorts/
    63                     file copy ${workpath}/build/Release/${name}.app \
    64                               ${destroot}/Applications/MacPorts/
     58# Maybe it's a good idea not to use a deployment target that's newer than the SDK.
     59if {[vercmp ${macosx_deployment_target} ${configure.sdk_version}] > 0} {
     60    macosx_deployment_target ${configure.sdk_version}
    6561}
    6662
    67 default_variants +universal
    68 variant universal {}
    69 pre-fetch {
    70         if {![variant_isset universal]} {
    71                 return -code error "${name} is only available in a universal version"
    72         }
     63destroot {
     64    copy ${worksrcpath}/build/${xcode.configuration}/${name}.app \
     65        ${destroot}${applications_dir}
    7366}