ruediger / VobSub2SRT

Converts VobSub subtitles (.idx/.srt format) into .srt subtitles.
GNU General Public License v3.0
294 stars 66 forks source link

vobsub2srt ebuild for gentoo #13

Closed thawn closed 12 years ago

thawn commented 12 years ago

Hi,

I was not sure, where to put this, so I am putting it here. I have created an ebuild that allows installing vobsub2srt and its dependencies on a gentoo machine. I put the ebuild code below. just copy and paste it into a file called vobsub2srt-9999.ebuild in the directory /usr/local/portage/media/video/vobsub2srt/. Then, you need to open a terminal, cd to that directory and run ebuild vobsub2srt-999.ebuild digest. Afterwards you can compile and install the latest git version of vobsub2srt by running emerge vobsub2srt It works with a stable release of gentoo where it will use tesseract 2.04-r1. However that tesseract version is quite old. in order to get tesseract 3.x to run, you need to enable the 'stuff' portage overlay as follows. run emerge layman then run layman -a stuff which will enable a small gentoo overlay that contains tesseract 3.01 and its dependencies that are not in the standard portage tree. Afterwards, you can again just emerge vobsub2srt which will then use tesseract 3.01. Here is the ebuild:

# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /media-video/vobsub2srt/ChangeLog,v 0.1 2012/01/06 19:15:04 thawn Exp $

EAPI="4"

EGIT_REPO_URI="git://github.com/ruediger/VobSub2SRT.git"

inherit git-2

IUSE=""

DESCRIPTION="Converts image subtitles created by VobSub (.sub/.idx) to .srt textual subtitles using tesseract OCR engine"
HOMEPAGE="https://github.com/ruediger/VobSub2SRT"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND=">=app-text/tesseract-2.04-r1
    >=virtual/ffmpeg-0.6.90"
DEPEND="${RDEPEND}"
src_configure() {
    econf
}
src_compile() {
    emake || die
}

src_install() {
    emake DESTDIR="${D}" install || die
}
ruediger commented 12 years ago

Thanks for your contribution. I added the script to packaging/vobsub2srt-999.ebuild and added some basic instructions to the README (script version of your explanation. I hope it works.). I added you to the list of Contributors. If you like I'll add your real name and email.

holliday commented 11 years ago

Sorry, if I am beating a dead horse, but here is a simplified ebuild, which makes use of cmake-utils.eclass. It also properly installs into /usr prefix instead of /usr/local.

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="4"

EGIT_REPO_URI="git://github.com/ruediger/VobSub2SRT.git"

inherit cmake-utils git-2

IUSE=""

DESCRIPTION="Converts image subtitles created by VobSub (.sub/.idx) to .srt textual subtitles using tesseract OCR engine"
HOMEPAGE="https://github.com/ruediger/VobSub2SRT"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND=">=app-text/tesseract-2.04-r1
    >=virtual/ffmpeg-0.6.90"
DEPEND="${RDEPEND}"
ruediger commented 11 years ago

Thanks! I've updated the ebuild script.

AzP commented 7 years ago

Hi, I've been using the ebuild but I'm wondering if it's possible to disable OpenCL in the build? I'm running the Mesa amd drivers, so I have to disable it to get it to build.

salfter commented 6 years ago

EAPI=4 is no longer accepted by Gentoo. Your ebuild will still work if you change to EAPI=5...just did that, and it built and ripped subtitles out of a ripped DVD.