~ubuntu-branches/ubuntu/wily/ffmpeg/wily

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Reinhard Tartler, Andreas Cadhalpun
  • Date: 2015-07-20 10:23:49 UTC
  • mfrom: (27.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20150720102349-prx70m0x0su1xek6
Tags: 7:2.7.2-1
[ Reinhard Tartler ]
* Add myself to uploaders.
* Merge qt-faststart back into 'ffmpeg'.

[ Andreas Cadhalpun ]
* Upload to unstable.
* Import new upstream bugfix release 2.7.2.
   - Make -xerror with multi-threading more robust. (Closes: #780344)
* Enable frei0r, opencv, x264, x265 on x32 and x265 on sparc64.
* Disable x264 on sparc64 due to #792921.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
# Ubuntu ld adds -Bsymbolic-functions by default, but that prevents FFmpeg from building.
23
23
export DEB_LDFLAGS_MAINT_STRIP=-Wl,-Bsymbolic-functions
24
24
 
25
 
# Enable as many features as possible, as long as the result is still GPLv2+ (and not only GPLv3+).
26
 
# Therefore the following flags (and build-dependencies) are not added:
27
 
#   --enable-libopencore_amrnb      (libopencore-amrnb-dev)
28
 
#   --enable-libopencore_amrwb      (libopencore-amrwb-dev)
29
 
#   --enable-libvo_aacenc           (libvo-aacenc-dev)
30
 
#   --enable-libvo_amrwbenc         (libvo-amrwbenc-dev)
31
 
#   --enable-libsmbclient           (libsmbclient-dev)
 
25
# Package name for the extra flavor.
 
26
EXTRA_PKG := $(shell sed -nr 's/^Package:[[:space:]]*(.*extra[0-9]+)[[:space:]]*$$/\1/p' debian/control)
 
27
FLAVORS = extra
 
28
 
 
29
# Enable as many features as possible, as long as the result is still GPLv2+ (a GPLv3+ variant is built as libavcodec-extra flavor).
 
30
# The following flags (and build-dependencies) are not added, because they would require a libavformat-extra flavor:
 
31
#   --enable-libsmbclient           (libsmbclient-dev [!hurd-i386 !m68k !sparc64])
32
32
# The following flags are not added, because the necessary libraries are not in Debian:
33
33
#   --enable-decklink
34
34
#   --enable-libcelt                (see #676592: removed from Debian as abandoned upstream, replaced by opus)
64
64
        --disable-stripping \
65
65
        --enable-avresample \
66
66
        --enable-avisynth \
 
67
        --enable-frei0r \
67
68
        --enable-gnutls \
68
69
        --enable-ladspa \
69
70
        --enable-libass \
80
81
        --enable-libmodplug \
81
82
        --enable-libmp3lame \
82
83
        --enable-libopenjpeg \
 
84
        --enable-openal \
83
85
        --enable-libopus \
84
86
        --enable-libpulse \
85
87
        --enable-librtmp \
86
88
        --enable-libschroedinger \
87
89
        --enable-libshine \
88
90
        --enable-libspeex \
89
 
        --enable-libssh \
90
91
        --enable-libtheora \
91
92
        --enable-libtwolame \
92
93
        --enable-libvorbis \
98
99
        --enable-opengl \
99
100
        --enable-x11grab
100
101
 
 
102
# With these enabled, resulting binaries are effectively licensed as GPLv3+.
 
103
CONFIG_extra = --enable-version3 \
 
104
        --disable-doc \
 
105
        --disable-programs \
 
106
        --disable-avdevice \
 
107
        --disable-avfilter \
 
108
        --disable-avformat \
 
109
        --disable-avresample \
 
110
        --disable-postproc \
 
111
        --disable-swscale \
 
112
        --enable-libopencore_amrnb \
 
113
        --enable-libopencore_amrwb \
 
114
        --enable-libvo_aacenc \
 
115
        --enable-libvo_amrwbenc
 
116
 
101
117
# Disable optimizations if requested.
102
118
ifneq (,$(filter $(DEB_BUILD_OPTIONS),noopt))
103
119
        CONFIG += --disable-optimizations
114
130
        CONFIG += --enable-libzmq
115
131
endif
116
132
 
117
 
# Some libraries are not available on x32.
118
 
ifneq ($(DEB_HOST_ARCH),x32)
119
 
        CONFIG += --enable-frei0r \
120
 
        --enable-libx264
 
133
# libssh is not available on sparc due to #790067.
 
134
ifneq ($(DEB_HOST_ARCH),sparc)
 
135
        CONFIG += --enable-libssh
121
136
endif
122
137
 
123
 
# Some libraries are not available on sparc64.
 
138
# Some libraries are not available/unusable (#792921) on sparc64.
124
139
ifneq ($(DEB_HOST_ARCH),sparc64)
125
140
        CONFIG += --enable-libsoxr \
126
 
        --enable-openal
127
 
else
128
 
        # added temporarily to debug SIGBUS errors in the fate tests on sparc64
129
 
        CONFIG += --target-exec="gdb --batch -ex r -ex 'bt full' -ex q --args"
 
141
        --enable-libx264
130
142
endif
131
143
 
132
144
# OpenCV is not available on some architectures.
133
 
ifeq (,$(filter $(DEB_HOST_ARCH),alpha sh4 sparc64 x32))
 
145
ifeq (,$(filter $(DEB_HOST_ARCH),alpha sh4 sparc64))
134
146
        CONFIG += --enable-libopencv
135
147
endif
136
148
 
137
 
# X265 is not (yet) available on some architectures.
138
 
ifeq (,$(filter $(DEB_HOST_ARCH),sparc64 x32))
 
149
# Recent x265 is not available on alpha due to #789807.
 
150
ifeq (,$(filter $(DEB_HOST_ARCH),alpha))
139
151
        CONFIG += --enable-libx265
140
152
endif
141
153
 
150
162
        # Build an altivec flavor of the libraries on powerpc.
151
163
        # This works around the problem that runtime cpu detection on powerpc currently does not work,
152
164
        # because, if altivec is enabled, all files are build with '-maltivec' so that the compiler inserts altivec instructions, wherever it likes.
153
 
        CONFIG_altivec = --enable-altivec --disable-doc
154
 
        FLAVORS += altivec
 
165
        CONFIG_altivec = --enable-altivec \
 
166
                --disable-doc \
 
167
                --disable-programs
 
168
        CONFIG_altivec-extra = $(CONFIG_altivec) $(CONFIG_extra)
 
169
        FLAVORS += altivec altivec-extra
155
170
endif
156
171
 
157
172
# Disable assembly optimizations on x32, because they don't work (yet).
210
225
        echo " *** standard ***"
211
226
        make tools/qt-faststart
212
227
        dh_auto_build -a || (cat config.log && exit 1)
 
228
        # Copy built object files to avoid building them again for the extra flavor.
213
229
        for flavor in $(FLAVORS); do \
214
230
                echo " *** $$flavor ***"; \
 
231
                if echo "$$flavor" | grep -q "extra"; then \
 
232
                        subdir=`echo "$$flavor" | grep "-" | sed 's_\(.*\)-.*_debian/\1/_'`; \
 
233
                        for dir in `cd ./$$subdir; find libavcodec libavutil libswresample -type d`; do \
 
234
                                mkdir -p debian/"$$flavor"/"$$dir"; \
 
235
                                echo "$$subdir$$dir"/*.o | grep -q '*' || cp "$$subdir$$dir"/*.o debian/"$$flavor"/"$$dir"; \
 
236
                        done; \
 
237
                        rm debian/"$$flavor"/libavcodec/allcodecs.o; \
 
238
                fi; \
215
239
                dh_auto_build -a --sourcedirectory=debian/"$$flavor" || (cat debian/"$$flavor"/config.log && exit 1); \
216
240
        done
217
241
 
218
 
# Set the library path for the dynamic linker, because the test otherwise don't find the libraries.
 
242
# Set the library path for the dynamic linker, because the tests otherwise don't find the libraries.
219
243
override_dh_auto_test:
220
244
        export LD_LIBRARY_PATH="libavcodec:libavdevice:libavfilter:libavformat:libavresample:libavutil:libpostproc:libswresample:libswscale"; dh_auto_test -- -k
221
245
 
222
246
override_dh_auto_install:
223
247
        dh_auto_install
224
248
ifeq ($(DEB_HOST_ARCH),powerpc)
225
 
        install -d debian/tmp/usr/lib/powerpc-linux-gnu/altivec
226
 
        install -m 644 debian/altivec/*/*.so.* debian/tmp/usr/lib/powerpc-linux-gnu/altivec
 
249
        install -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
 
250
        install -m 644 debian/altivec/*/*.so.* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
 
251
endif
 
252
        dh_auto_install --sourcedirectory=debian/extra --destdir=debian/tmp/extra
 
253
ifeq ($(DEB_HOST_ARCH),powerpc)
 
254
        install -d debian/tmp/extra/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
 
255
        install -m 644 debian/altivec/*/*.so.* debian/tmp/extra/usr/lib/$(DEB_HOST_MULTIARCH)/altivec
227
256
endif
228
257
        # Create symbolic links from the standard library lib*.so symlinks, pkg-config files and static libraries to the suffixed ones.
229
258
        for lib in `find debian/ -name lib*-ffmpeg.so; find debian/ -name lib*.pc; find debian/ -name lib*.a`; do \
234
263
                mv $$link $$dir; \
235
264
        done
236
265
 
 
266
override_dh_install:
 
267
        dh_install -N $(EXTRA_PKG)
 
268
        dh_install -p $(EXTRA_PKG) --sourcedir=debian/tmp/extra
 
269
 
237
270
# Don't compress the example source code files.
238
271
override_dh_compress:
239
272
        dh_compress -Xexamples