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 |
---|
2 | # $Id: Portfile 120912 2014-06-11 13:10:52Z ciserlohn@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup qt5 1.0 |
---|
6 | PortGroup cmake 1.1 |
---|
7 | PortGroup github 1.0 |
---|
8 | |
---|
9 | name qmplay2 |
---|
10 | |
---|
11 | description A Qt5-based video and audio player. |
---|
12 | long_description QMPlay2 is a video and audio player. It can play all formats \ |
---|
13 | supported by FFmpeg, libmodplug (including J2B and SFX). It also \ |
---|
14 | supports Audio CD, raw files, Rayman 2 music and chiptunes. It \ |
---|
15 | contains YouTube and Prostopleer browsers. |
---|
16 | license LGPL-3 |
---|
17 | maintainers gmail.com:rjvbertin openmaintainer |
---|
18 | platforms darwin linux |
---|
19 | |
---|
20 | subport ${name}-devel { |
---|
21 | long_description A QMPlay2 port aimed at development purposes. |
---|
22 | } |
---|
23 | |
---|
24 | |
---|
25 | if {${subport} eq "${name}"} { |
---|
26 | github.setup zaps166 QMPlay2 17.04.21 |
---|
27 | checksums rmd160 e93bd8cc61119ffef0f33634ebc2ad97921b49cb \ |
---|
28 | sha256 17b2a5b0930190e64f2c7bf44de36f1ee1c2f980c86a7e6331a10a70803340ae |
---|
29 | } else { |
---|
30 | github.setup zaps166 QMPlay2 154abbb08b78a6edec8421ea7d35ebd4917c26d1 |
---|
31 | version 17.04.21.9 |
---|
32 | # this port is intended to facilitate development efforts shared with "upstreams" |
---|
33 | # so using git instead of a tarball fetch type is more appropriate. |
---|
34 | fetch.type git |
---|
35 | distname qmplay2-git |
---|
36 | } |
---|
37 | |
---|
38 | cmake.save_configure_cmd |
---|
39 | |
---|
40 | configure.args-append \ |
---|
41 | -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \ |
---|
42 | -DUSE_QT5=ON \ |
---|
43 | -DUSE_FFMPEG_AVDEVICE=ON \ |
---|
44 | -DUSE_OPENGL_FOR_VISUALIZATIONS=ON \ |
---|
45 | -DUSE_JEMALLOC=ON |
---|
46 | |
---|
47 | if {![variant_exists LTO]} { |
---|
48 | variant LTO description {Build with link-time optimisation} {} |
---|
49 | } |
---|
50 | if {[variant_isset LTO]} { |
---|
51 | configure.args-append \ |
---|
52 | -DUSE_LINK_TIME_OPTIMIZATION=ON |
---|
53 | } |
---|
54 | |
---|
55 | platform linux { |
---|
56 | cmake.install_rpath-prepend \ |
---|
57 | ${qt_libs_dir} |
---|
58 | # don't use the buildsystem's rpath support |
---|
59 | # (it will install only a single path) |
---|
60 | configure.args-append \ |
---|
61 | -DSET_INSTALL_RPATH=OFF |
---|
62 | } |
---|
63 | |
---|
64 | qt5.depends_component \ |
---|
65 | qtsvg qttools |
---|
66 | depends_lib-append port:ffmpeg \ |
---|
67 | port:portaudio \ |
---|
68 | port:jemalloc |
---|
69 | |
---|
70 | patch.pre_args -Np1 |
---|
71 | patchfiles-append patch-macports-build.diff |
---|
72 | |
---|
73 | platform darwin { |
---|
74 | ## build system is set up to create a standalone, all-inclusive app bundle! |
---|
75 | depends_lib-append \ |
---|
76 | port:libass \ |
---|
77 | port:taglib \ |
---|
78 | port:libcdio \ |
---|
79 | port:libcddb |
---|
80 | |
---|
81 | configure.args-append \ |
---|
82 | -DUSE_PULSEAUDIO=OFF \ |
---|
83 | -DBUNDLE_INSTALL_DIR=${qt_apps_dir} \ |
---|
84 | -DUSE_XVIDEO=OFF |
---|
85 | post-destroot { |
---|
86 | file rename ${destroot}${qt_apps_dir}/QMPlay2.app/Contents/MacOS/libqmplay2.dylib ${destroot}${prefix}/lib/ |
---|
87 | # install a wrapper script in ${prefix}/bin |
---|
88 | if {[info procs "qt5.add_app_wrapper"] ne ""} { |
---|
89 | qt5.add_app_wrapper QMPlay2 |
---|
90 | } else { |
---|
91 | system "echo \"#!/bin/sh\nexec \\\"${qt_apps_dir}/QMPlay2.app/Contents/MacOS/QMPlay2\\\" \\\"\\\$\@\\\"\" > ${destroot}${prefix}/bin/QMPlay2" |
---|
92 | system "chmod 755 ${destroot}${prefix}/bin/QMPlay2" |
---|
93 | } |
---|
94 | } |
---|
95 | } |
---|