Skip to content

Commit

Permalink
MacPorts update
Browse files Browse the repository at this point in the history
  • Loading branch information
devernay committed Sep 27, 2023
1 parent 0912a53 commit 3f1f7be
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 74 deletions.
64 changes: 27 additions & 37 deletions tools/MacPorts/multimedia/ffmpeg/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ conflicts ffmpeg-devel

# Please increase the revision of mpv whenever ffmpeg's version is updated.
version 4.4.4
revision 1
revision 2
epoch 1

license LGPL-2.1+
Expand Down Expand Up @@ -308,14 +308,10 @@ platform darwin {
port:svt-av1
}

# Available on 10.6+
if {(${os.major} >= 10) && (${configure.build_arch} ne "ppc")} {
# Only enable 'rav1e', for non-slim installation
if {![variant_isset slim]} {
configure.args-append \
--enable-librav1e
depends_lib-append \
port:rav1e
# rav1e available on 10.6+
if {(${os.major} < 10) || (${configure.build_arch} eq "ppc")} {
if {[variant_isset rav1e]} {
error "Variant rav1e not supported for macOS 10.5 and earlier, or PPC"
}
}
}
Expand Down Expand Up @@ -576,50 +572,44 @@ variant nonfree description {enable nonfree code, libraries and binaries will no
port:libfdk-aac
}

variant slim description {Trim dependencies slightly, without significantly impacting overall feature set} {}
variant rav1e description {Enable codec rav1e} {
configure.args-append \
--enable-librav1e
depends_lib-append \
port:rav1e
}

if {![variant_isset rav1e]} {
notes-append "Support for rav1e now disabled by default; enable via +rav1e"
}

if {[variant_isset nonfree]} {
notes "
notes-append "
This build of ${name} includes nonfree code as follows:
libfdk-aac
The following libraries and binaries may not be redistributed:
ffmpeg
libavcodec
libavdevice
libavfilter
libavformat
libavutil
ffmpeg libavcodec libavdevice libavfilter libavformat libavutil
To remove this restriction remove the variant +nonfree
"
} elseif {[variant_isset gpl3]} {
notes "
This build of ${name} includes GPLed code and is therefore licensed under GPL v3 or later.
notes-append "
This build of ${name} includes GPLed code and is therefore licensed under GPL v3 or later.\
The following modules are GPLed:
postproc
libsambaclient
libvidstab
libx264
libx265
libxvid
To include all nonfree, GPLed and LGPL code use variant +nonfree.
libsambaclient libvidstab libx264 libx265 libxvid postproc
To include all nonfree, GPLed and LGPL code use variant +nonfree.\
To remove nonfree and GPLed code leaving only LGPL code remove the +gpl2 and +gpl3 variants.
"
} elseif {[variant_isset gpl2]} {
notes "
This build of ${name} includes GPLed code and is therefore licensed under GPL v2 or later.
notes-append "
This build of ${name} includes GPLed code and is therefore licensed under GPL v2 or later.\
The following modules are GPLed:
postproc
libvidstab
libx264
libx265
libxvid
To include all nonfree, GPLed and LGPL code use variant +nonfree.
libvidstab libx264 libx265 libxvid postproc
To include all nonfree, GPLed and LGPL code use variant +nonfree.\
To remove nonfree and GPLed code leaving only LGPL code remove the +gpl2 variant.
"
} else {
notes "
This build of ${name} includes no GPLed or nonfree code\
and is therefore licensed under LGPL v2.1 or later.
notes-append "
This build of ${name} includes no GPLed or nonfree code and is therefore licensed under LGPL v2.1 or later.
"
}

Expand Down
64 changes: 27 additions & 37 deletions tools/MacPorts/multimedia/ffmpeg/Portfile.orig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ conflicts ffmpeg-devel

# Please increase the revision of mpv whenever ffmpeg's version is updated.
version 4.4.4
revision 1
revision 2
epoch 1

license LGPL-2.1+
Expand Down Expand Up @@ -296,14 +296,10 @@ platform darwin {
port:svt-av1
}

# Available on 10.6+
if {(${os.major} >= 10) && (${configure.build_arch} ne "ppc")} {
# Only enable 'rav1e', for non-slim installation
if {![variant_isset slim]} {
configure.args-append \
--enable-librav1e
depends_lib-append \
port:rav1e
# rav1e available on 10.6+
if {(${os.major} < 10) || (${configure.build_arch} eq "ppc")} {
if {[variant_isset rav1e]} {
error "Variant rav1e not supported for macOS 10.5 and earlier, or PPC"
}
}
}
Expand Down Expand Up @@ -476,50 +472,44 @@ variant nonfree description {enable nonfree code, libraries and binaries will no
port:libfdk-aac
}

variant slim description {Trim dependencies slightly, without significantly impacting overall feature set} {}
variant rav1e description {Enable codec rav1e} {
configure.args-append \
--enable-librav1e
depends_lib-append \
port:rav1e
}

if {![variant_isset rav1e]} {
notes-append "Support for rav1e now disabled by default; enable via +rav1e"
}

if {[variant_isset nonfree]} {
notes "
notes-append "
This build of ${name} includes nonfree code as follows:
libfdk-aac
The following libraries and binaries may not be redistributed:
ffmpeg
libavcodec
libavdevice
libavfilter
libavformat
libavutil
ffmpeg libavcodec libavdevice libavfilter libavformat libavutil
To remove this restriction remove the variant +nonfree
"
} elseif {[variant_isset gpl3]} {
notes "
This build of ${name} includes GPLed code and is therefore licensed under GPL v3 or later.
notes-append "
This build of ${name} includes GPLed code and is therefore licensed under GPL v3 or later.\
The following modules are GPLed:
postproc
libsambaclient
libvidstab
libx264
libx265
libxvid
To include all nonfree, GPLed and LGPL code use variant +nonfree.
libsambaclient libvidstab libx264 libx265 libxvid postproc
To include all nonfree, GPLed and LGPL code use variant +nonfree.\
To remove nonfree and GPLed code leaving only LGPL code remove the +gpl2 and +gpl3 variants.
"
} elseif {[variant_isset gpl2]} {
notes "
This build of ${name} includes GPLed code and is therefore licensed under GPL v2 or later.
notes-append "
This build of ${name} includes GPLed code and is therefore licensed under GPL v2 or later.\
The following modules are GPLed:
postproc
libvidstab
libx264
libx265
libxvid
To include all nonfree, GPLed and LGPL code use variant +nonfree.
libvidstab libx264 libx265 libxvid postproc
To include all nonfree, GPLed and LGPL code use variant +nonfree.\
To remove nonfree and GPLed code leaving only LGPL code remove the +gpl2 variant.
"
} else {
notes "
This build of ${name} includes no GPLed or nonfree code\
and is therefore licensed under LGPL v2.1 or later.
notes-append "
This build of ${name} includes no GPLed or nonfree code and is therefore licensed under LGPL v2.1 or later.
"
}

Expand Down

0 comments on commit 3f1f7be

Please sign in to comment.