Source: ccextractor
Version: 0.86+ds1-2
Severity: wishlist
Tags: patch

If ccextractor is to have OCR and hard subtitle extraction support,
then configure the build as needed, otherwise drop the extraneous
build dependencies and simplify the Debian build process (ie drop
dh_auto_build override).  Patches are attached to implement either
option.

In backporting ccextractor to Ubuntu 16.04/"Xenial" and
18.04/"Bionic", I noticed that though there are build dependencies on
FFmpeg, Tesseract, and Leptonica, there are no corresponding binary
package dependencies, which means they are either not linked or are
statically linked.  Reviewing the build logs it can be seen that
ccextractor is not linked with those libraries.

Tesseract and Leptonica are used for OCR support and they and FFmpeg
are used for hard subtitle extraction support.  Both features can be
enabled with:

configure --enable-ocr --enable-hardsubx

(It could be argued that "--enable-ocr" is unnecessary/redundant as
"--enable-hardsubx" sets both "HARDSUBX_IS_ENABLED" and
"OCR_IS_ENABLED" in the build process.)

I know that the documentation (ie docs/FFMPEG.TXT, docs/HARDSUBX.txt,
and docs/OCR.txt) is misleading in saying that "make ENABLE_XXX=yes"
enables support for a feature, and that might be why debian/rules has
the dh_auto_build override referencing "ENABLE_FFMPEG=yes
ENABLE_OCR=yes", but that is wrong (though OCR.md is fixed in upstream
Git commit e0b909a6).

For the details see configure.ac and Makefile.am, specifically
references to *_IS_ENABLED (or the lack thereof, ie FFMPEG_IS_ENABLED
doesn't appear in Makefile.am).

Corey
--
undefi...@pobox.com
diff -urpd ccextractor-0.86+ds1~/debian/control ccextractor-0.86+ds1/debian/control
--- ccextractor-0.86+ds1~/debian/control	2018-11-22 00:39:12.643066392 +0000
+++ ccextractor-0.86+ds1/debian/control	2018-11-22 00:41:54.288813546 +0000
@@ -3,10 +3,8 @@ Section: utils
 Priority: optional
 Maintainer: Freexian Packaging Team <team+freex...@tracker.debian.org>
 Uploaders: Sophie Brun <sop...@freexian.com>, Raphaël Hertzog <hert...@debian.org>
-Build-Depends: debhelper (>= 11), libpng-dev, libavcodec-dev,
- libavformat-dev, libavutil-dev, libavfilter-dev, libleptonica-dev (>= 1.73~),
- libtesseract-dev (>= 4.00~), libutf8proc-dev, libcurl4-gnutls-dev, pkg-config,
- libfreetype6-dev
+Build-Depends: debhelper (>= 11), libpng-dev, libutf8proc-dev,
+ libcurl4-gnutls-dev, pkg-config, libfreetype6-dev
 Standards-Version: 4.2.1
 Homepage: https://www.ccextractor.org/
 Vcs-Git: https://salsa.debian.org/freexian-team/ccextractor.git
diff -urpd ccextractor-0.86+ds1~/debian/rules ccextractor-0.86+ds1/debian/rules
--- ccextractor-0.86+ds1~/debian/rules	2018-11-21 18:29:13.000000000 +0000
+++ ccextractor-0.86+ds1/debian/rules	2018-11-22 00:35:11.630423146 +0000
@@ -5,9 +5,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardeni
 %:
 	dh $@ --with autoreconf --sourcedirectory=linux
 
-override_dh_auto_build:
-	dh_auto_build -- ENABLE_FFMPEG=yes ENABLE_OCR=yes
-
 override_dh_installchangelogs:
 	dh_installchangelogs docs/CHANGES.TXT
 
--- ccextractor-0.86+ds1~/debian/rules	2018-11-21 18:29:13.000000000 +0000
+++ ccextractor-0.86+ds1/debian/rules	2018-11-22 00:08:56.752344385 +0000
@@ -5,8 +5,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardeni
 %:
 	dh $@ --with autoreconf --sourcedirectory=linux
 
-override_dh_auto_build:
-	dh_auto_build -- ENABLE_FFMPEG=yes ENABLE_OCR=yes
+override_dh_auto_configure:
+	dh_auto_configure -- --enable-ocr --enable-hardsubx
 
 override_dh_installchangelogs:
 	dh_installchangelogs docs/CHANGES.TXT

Reply via email to