-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlt6.spec
218 lines (166 loc) · 6 KB
/
mlt6.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
%global commit0 531aa1a19df55cc378c9c79b86c7cbb187487f37
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
%global gver .git%{shortcommit0}
#
#%define _legacy_common_support 1
%global debug_package %{nil}
%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{php_extdir}/.*\\.so$
%bcond_with ruby
%bcond_with php
Summary: Toolkit for broadcasters, video editors, media players, transcoders
Name: mlt6
Version: 6.26.1
Release: 10%{?dist}
License: GPLv3 and LGPLv2+
URL: http://www.mltframework.org/twiki/bin/view/MLT/
Group: System Environment/Libraries
Source0: https://github.com/mltframework/mlt/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
BuildRequires: frei0r-devel
BuildRequires: rtaudio-devel
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: opencv-devel >= 4.5.0
BuildRequires: opencv-static >= 4.5.0
BuildRequires: qt-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qt3d-devel
BuildRequires: libquicktime-devel
BuildRequires: SDL2-devel
BuildRequires: SDL2_image-devel
BuildRequires: SDL-devel
BuildRequires: SDL_image-devel
BuildRequires: gtk2-devel
BuildRequires: jack-audio-connection-kit-devel
BuildRequires: libogg-devel
BuildRequires: swig >= 3.0.11
BuildRequires: php-devel
#Deprecated dv, kino, and vorbis modules are not built.
#https://github.com/mltframework/mlt/commit/9d082192a4d79157e963fd7f491da0f8abab683f
#BuildRequires: libdv-devel
#BuildRequires: libvorbis-devel
BuildRequires: libsamplerate-devel
BuildRequires: ladspa-devel
BuildRequires: libxml2-devel
BuildRequires: sox-devel
BuildRequires: swig
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: freetype-devel
BuildRequires: libexif-devel
BuildRequires: fftw-devel
BuildRequires: xine-lib-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: lua-devel
BuildRequires: tcl-devel
BuildRequires: ninja-build
BuildRequires: vid.stab-devel
BuildRequires: movit-devel
BuildRequires: eigen3-devel
BuildRequires: libebur128-devel
BuildRequires: libatomic
BuildRequires: chrpath
Provides: mlt%{?_isa} = %{version}-%{release}
%if %{with ruby}
BuildRequires: ruby-devel ruby
%endif
Requires: opencv-core
Recommends: %{name}-freeworld%{?_isa} = %{version}-%{release}
%description
MLT is an open source multimedia framework, designed and developed for
television broadcasting.
It provides a toolkit for broadcasters, video editors,media players,
transcoders, web streamers and many more types of applications. The
functionality of the system is provided via an assortment of ready to use
tools, xml authoring components, and an extendible plug-in based API.
%package devel
Summary: Libraries, includes to develop applications with %{name}
License: LGPLv2+
Group: Development/Libraries
Requires: pkgconfig
Requires: %{name}%{?_isa} = %{version}-%{release}
%package -n python3-mlt6
Requires: python3
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Python3 package to work with MLT
%package freeworld
BuildRequires: ffmpeg4-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
Summary: Freeworld support part of MLT.
%description devel
The %{name}-devel package contains the header files and static libraries for
building applications which use %{name}.
%description -n python3-mlt6
This module allows to work with MLT using python.
%description freeworld
This package give us the freeworld (ffmpeg support) part of MLT.
%prep
%autosetup -n mlt-%{commit0} -p1
chmod 644 src/modules/qt/kdenlivetitle_wrapper.cpp
chmod 644 src/modules/kdenlive/filter_freeze.c
chmod -x demo/demo
# Don't overoptimize (breaks debugging)
sed -i -e '/fomit-frame-pointer/d' configure
sed -i -e '/ffast-math/d' configure
# respect CFLAGS LDFLAGS when building shared libraries. Bug #308873
for x in python lua; do
sed -i "/mlt.so/s: -lmlt++ :& ${CFLAGS} ${LDFLAGS} :" src/swig/$x/build || die
done
# swig fix
sed -i "/^LDFLAGS/s: += :& ${LDFLAGS} :" src/swig/ruby/build
%if 0%{?fedora} >= 26
# xlocale.h is gone in F26/RAWHIDE
sed -r -i 's/#include <xlocale.h>/#include <locale.h>/' src/framework/mlt_property.h
%endif
# Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works
find src/swig/python -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|'
%build
#export STRIP=/bin/true
./configure --prefix=%{_prefix} \
--libdir=%{_libdir} \
--avformat-swscale \
--enable-gpl \
--enable-gpl3 \
--enable-motion-est \
%ifarch ppc ppc64
--disable-mmx \
--disable-sse \
--disable-xine \
%endif
--rename-melt=mlt-melt \
--swig-languages="python"
make %{?_smp_mflags}
%install
# https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out
export PYTHON_DISALLOW_AMBIGUOUS_VERSION=0
make DESTDIR=%{buildroot} install
# manually do what 'make install' skips
install -D -pm 0644 src/swig/python/mlt.py %{buildroot}%{python3_sitelib}/mlt.py
install -D -pm 0755 src/swig/python/_mlt.so %{buildroot}%{python3_sitearch}/_mlt.so
mv src/modules/motion_est/README README.motion_est
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%doc AUTHORS NEWS README*
%license COPYING GPL
%{_bindir}/mlt-melt
%{_libdir}/mlt/
%{_libdir}/libmlt++.so.*
%{_libdir}/libmlt.so.*
%{_datadir}/mlt/
%files -n python3-mlt6
%{python3_sitelib}/mlt.py*
%{python3_sitearch}/_mlt.so
%{python3_sitelib}/__pycache__/mlt.*
%files devel
%doc docs/* demo/
%{_libdir}/pkgconfig/mlt-framework.pc
%{_libdir}/pkgconfig/mlt++.pc
%{_libdir}/libmlt.so
%{_libdir}/libmlt++.so
%{_includedir}/mlt/
%{_includedir}/mlt++/
%files freeworld
%{_libdir}/mlt/libmltavformat.so
%changelog
* Sun May 22 2022 Unitedrpms Project <unitedrpms AT protonmail DOT com> 6.26.1-4
- Initial build