Merge pull request 'ffmpeg2theora: bury' (#104) from tgurr/hasufell-repository:ffmpeg2theora into master

Reviewed-on: hasufell/hasufell-repository#104
This commit is contained in:
Ridai Govinda Pombo 2022-08-26 21:43:12 +00:00
commit 69e630e54b
3 changed files with 0 additions and 139 deletions

View File

@ -1,46 +0,0 @@
# Copyright 2016 Julian Ospald <hasufell@posteo.de>
# Distributed under the terms of the GNU General Public License v2
require scons
SUMMARY="A simple converter to create Ogg Theora files"
HOMEPAGE="http://www.v2v.cc/~j/ffmpeg2theora/"
DOWNLOADS="http://www.v2v.cc/~j/${PN}/downloads/${PNV}.tar.bz2"
LICENCES="GPL-3"
SLOT="0"
PLATFORMS="~amd64 ~x86"
MYOPTIONS="
( providers: ffmpeg libav ) [[ number-selected = exactly-one ]]
"
DEPENDENCIES="
build:
virtual/pkg-config
build+run:
media-libs/libvorbis
media-libs/libogg
media-libs/libtheora
providers:ffmpeg? ( media/ffmpeg )
providers:libav? ( media/libav )
"
DEFAULT_SRC_PREPARE_PATCHES=(
-p0 "${FILES}"/${PN}-0.30-underlinking.patch
-p1 "${FILES}"/${PN}-0.30-build.patch
)
SCONS_SRC_CONFIGURE_PARAMS=(
libkate=0
bindir="${IMAGE}/usr/$(exhost --target)/bin"
destdir=${IMAGE}
prefix=/usr
)
SCONS_SRC_COMPILE_PARAMS=( "${SCONS_SRC_CONFIGURE_PARAMS[@]}" )
SCONS_SRC_INSTALL_PARAMS=( "${SCONS_SRC_CONFIGURE_PARAMS[@]}" )
src_install() {
scons_src_install
dodoc AUTHORS ChangeLog README subtitles.txt TODO
}

View File

@ -1,76 +0,0 @@
Source: Julian Ospald <hasufell@posteo.de>
Upstream: no
Reason: fix build by respecting pkg-config, CC etc
diff --git a/SConstruct b/SConstruct
index 2458096..eda1c41 100644
--- a/SConstruct
+++ b/SConstruct
@@ -4,6 +4,7 @@ from glob import glob
import os
import SCons
+import SCons.Util
def version():
#return "0.29"
@@ -41,6 +42,27 @@ opts.AddVariables(
env = Environment(options = opts)
Help(opts.GenerateHelpText(env))
+if os.environ.has_key('AR'):
+ env['AR'] = os.environ['AR']
+if os.environ.has_key('RANLIB'):
+ env['RANLIB'] = os.environ['RANLIB']
+if os.environ.has_key('CC'):
+ env['CC'] = os.environ['CC']
+if os.environ.has_key('CFLAGS'):
+ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
+if os.environ.has_key('CXX'):
+ env['CXX'] = os.environ['CXX']
+if os.environ.has_key('CXXFLAGS'):
+ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
+if os.environ.has_key('CPPFLAGS'):
+ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CPPFLAGS'])
+if os.environ.has_key('LDFLAGS'):
+ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+if os.environ.has_key('PKG_CONFIG'):
+ env['PKG_CONFIG'] = os.environ['PKG_CONFIG']
+else:
+ env['PKG_CONFIG'] = 'pkg-config'
+
pkg_flags="--cflags --libs"
if env['static']:
pkg_flags+=" --static"
@@ -75,9 +97,9 @@ if GetOption("help"):
def ParsePKGConfig(env, name):
if os.environ.get('PKG_CONFIG_PATH', ''):
- action = 'PKG_CONFIG_PATH=%s pkg-config %s "%s"' % (os.environ['PKG_CONFIG_PATH'], pkg_flags, name)
+ action = 'PKG_CONFIG_PATH=%s %s %s "%s"' % (os.environ['PKG_CONFIG_PATH'], env['PKG_CONFIG'], pkg_flags, name)
else:
- action = 'pkg-config %s "%s"' % (pkg_flags, name)
+ action = '%s %s "%s"' % (env['PKG_CONFIG'], pkg_flags, name)
return env.ParseConfig(action)
def TryAction(action):
@@ -89,16 +111,16 @@ def TryAction(action):
def CheckPKGConfig(context, version):
context.Message( 'Checking for pkg-config... ' )
- ret = TryAction('pkg-config --atleast-pkgconfig-version=%s' % version)[0]
+ ret = TryAction('%s --atleast-pkgconfig-version=%s' % (env['PKG_CONFIG'], version))[0]
context.Result( ret )
return ret
def CheckPKG(context, name):
context.Message( 'Checking for %s... ' % name )
if os.environ.get('PKG_CONFIG_PATH', ''):
- action = 'PKG_CONFIG_PATH=%s pkg-config --exists "%s"' % (os.environ['PKG_CONFIG_PATH'], name)
+ action = 'PKG_CONFIG_PATH=%s %s --exists "%s"' % (os.environ['PKG_CONFIG_PATH'], env['PKG_CONFIG'], name)
else:
- action = 'pkg-config --exists "%s"' % name
+ action = '%s --exists "%s"' % (env['PKG_CONFIG'], name)
ret = TryAction(action)[0]
context.Result( ret )
return ret

View File

@ -1,17 +0,0 @@
Source: Gentoo
Upstream: unknown
Reason: fix underlinking
--- SConstruct
+++ SConstruct
@@ -206,9 +206,8 @@
if env['crossmingw']:
env.Append(CCFLAGS=['-Wl,-subsystem,windows'])
env.Append(LIBS=['m'])
- elif env['static']:
- env.Append(LIBS=['m', 'dl'])
+ env.Append(LIBS=['m', 'dl'])
env = conf.Finish()