Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ minimum base to bootstrap on top of.

### Linux Setup

On Linux, you will only need a distribution with python >= 3.10. Cerbero will
On Linux, you will only need a distribution with python >= 3.7. Cerbero will
use your package manager to install all other required packages during
[bootstrap](#Bootstrap).

Expand All @@ -30,7 +30,7 @@ use your package manager to install all other required packages during
On macOS you will need to have install the following software:

* XCode
* Python 3.10+ https://www.python.org/downloads/
* Python 3.7+ https://www.python.org/downloads/

Cerbero will build all other required packages during [bootstrap](#Bootstrap).

Expand Down
4 changes: 2 additions & 2 deletions cerbero-uninstalled
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ import shlex

os.environ['CERBERO_UNINSTALLED'] = '1'

if not sys.version_info >= (3, 10, 0):
print('We require Python 3.10 or newer, but you have {}'.format(sys.version), file=sys.stderr)
if not sys.version_info >= (3, 7, 0):
print('We require Python 3.7 or newer, but you have {}'.format(sys.version), file=sys.stderr)
sys.exit(1)

# __file__ is not set when we're called with -c
Expand Down
3 changes: 1 addition & 2 deletions cerbero/bootstrap/build_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ def setup_venv(self):
if os.path.isfile(tof):
os.remove(tof)
shutil.move(os.path.join(scriptsdir, f), tof)
if os.path.exists(scriptsdir):
os.rmdir(scriptsdir)
os.rmdir(scriptsdir)
python = os.path.join(self.config.build_tools_prefix, 'bin', 'python')
shell.new_call([python, '-m', 'pip', 'install', 'setuptools', 'packaging'])

Expand Down
31 changes: 0 additions & 31 deletions data/ndk-build/gstreamer-1.0.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,37 +83,6 @@ ifeq ($(GSTREAMER_INCLUDE_CA_CERTIFICATES),yes)
GSTREAMER_DEPS += gio-2.0
endif

NEEDS_NOTEXT_FIX := no
NEEDS_BSYMBOLIC_FIX := no
ifeq ($(TARGET_ARCH_ABI),armeabi)
NEEDS_NOTEXT_FIX := yes
NEEDS_BSYMBOLIC_FIX := yes
else ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
NEEDS_NOTEXT_FIX := yes
NEEDS_BSYMBOLIC_FIX := yes
else ifeq ($(TARGET_ARCH_ABI),x86)
NEEDS_NOTEXT_FIX := yes
NEEDS_BSYMBOLIC_FIX := yes
else ifeq ($(TARGET_ARCH_ABI),x86_64)
NEEDS_BSYMBOLIC_FIX := yes
endif

# Text relocations are required for all 32-bit objects. We
# must disable the warning to allow linking with lld. Unlike gold, ld which
# will silently allow text relocations, lld support must be explicit.
#
# See https://crbug.com/911658#c19 for more information. See also
# https://trac.ffmpeg.org/ticket/7878
ifeq ($(NEEDS_NOTEXT_FIX),yes)
GSTREAMER_LD := $(GSTREAMER_LD) -Wl,-z,notext
endif

# resolve textrels in the x86 asm
ifeq ($(NEEDS_BSYMBOLIC_FIX),yes)
GSTREAMER_LD := $(GSTREAMER_LD) -Wl,-Bsymbolic
endif


################################
# NDK Build Prebuilt library #
################################
Expand Down
5 changes: 0 additions & 5 deletions recipes/gst-plugins-bad-1.0.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ class Recipe(custom.GStreamer):
'win32ipc': 'disabled',
'wildmidi': 'disabled',
}

patches = [
'gst-plugins-bad/0001-d3d12-Fix-shaders-failing-to-compile-with-newer-dxc-.patch',
]

deps = ['gstreamer-1.0', 'gst-plugins-base-1.0', 'bzip2', 'libass',
'zlib', 'openh264', 'opus', 'librtmp', 'libxml2',
'libsrtp', 'libdca', 'libdvdnav', 'libnice',
Expand Down

This file was deleted.

13 changes: 11 additions & 2 deletions recipes/wavpack.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ from cerbero.tools.libtool import LibtoolLibrary

class Recipe(recipe.Recipe):
name = 'wavpack'
version = '5.7.0'
version = '5.4.0'
stype = SourceType.TARBALL
url = 'https://github.com/dbry/WavPack/archive/%(version)s.tar.gz'
tarball_dirname = 'WavPack-%(version)s'
tarball_checksum = 'c5742ba1054d36ff3d22f0101a9be066f55f6becb9b2a7352c79fa362f2d3d76'
tarball_checksum = 'abbe5ca3fc918fdd64ef216200a5c896243ea803a059a0662cd362d0fa827cd2'
licenses = [{License.BSD_like: ['COPYING']}]

btype = BuildType.CMAKE
Expand Down Expand Up @@ -61,6 +61,15 @@ class Recipe(recipe.Recipe):
shell.replace(os.path.join(self.config_src_dir, 'wavpack.pc.in'),
{'-lwavpack': '-lwavpack @LIBM@'})

async def install(self):
await super().install()
# CMake build system installs include/wavpack.h but we want
# include/wavpack/wavpack.h
incdir = Path(self.config.prefix) / 'include'
todir = incdir / 'wavpack'
todir.mkdir(exist_ok=True)
(incdir / 'wavpack.h').replace(todir / 'wavpack.h')

def post_install(self):
deps = ['-lm']
libtool_la = LibtoolLibrary('wavpack', None, None, None, self.config.libdir,
Expand Down
26 changes: 13 additions & 13 deletions recipes/wavpack/0001-cmake-Don-t-name-MSVC-DLL-wavpackdll.dll.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
From 3d0c4f86946a84275592ba5d47a6c41b2914ed53 Mon Sep 17 00:00:00 2001
From: Jeffery Wilson <jeff@jeffalwilson.com>
Date: Fri, 11 Oct 2024 15:29:49 -0400
From ba720c11041f65fd34e6b814899d3fa8466e8867 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 21 Jan 2022 15:34:21 +0530
Subject: [PATCH] cmake: Don't name MSVC DLL 'wavpackdll.dll'

It breaks the pkgconfig file and is very unexpected overall. Probably
Expand All @@ -10,18 +10,18 @@ can't be upstreamed.
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9f9e70..d2bb794 100644
index 7cd940c..970505b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,7 +234,7 @@ if(WIN32)
endif()
@@ -229,7 +229,7 @@ endif()

if(WIN32 AND (NOT MINGW))
if(BUILD_SHARED_LIBS)
- set_target_properties(wavpack PROPERTIES OUTPUT_NAME wavpackdll)
+ set_target_properties(wavpack PROPERTIES OUTPUT_NAME wavpack)
else()
if(BUILD_SHARED_LIBS)
- set_target_properties(wavpack PROPERTIES OUTPUT_NAME wavpackdll)
+ set_target_properties(wavpack PROPERTIES OUTPUT_NAME wavpack)
else()
set_target_properties(wavpack PROPERTIES OUTPUT_NAME libwavpack)
endif()
set_target_properties(wavpack PROPERTIES OUTPUT_NAME libwavpack)
endif()
--
2.47.0
2.34.1.windows.1

71 changes: 50 additions & 21 deletions recipes/x264.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,19 @@ from cerbero.tools.libtool import LibtoolLibrary


class Recipe(recipe.Recipe):
version = '0.164.3108+git31e19f9'
version = '20191217-2245'
name = 'x264'
stype = SourceType.TARBALL
btype = BuildType.MESON
# The snapshotting service is discontinued.
# However, there's no pinned tag for each stable commit.
# See https://download.videolan.org/pub/x264/snapshots/x264-snapshot-20191218-README.txt
# Patch and tarball must match the below port (keeping it for reference)
# remotes = {'origin': 'https://gitlab.freedesktop.org/gstreamer/meson-ports/%(name)s.git'}
# commit = 'origin/164.3108-meson'
# Source url = 'https://deb.debian.org/debian/pool/main/x/x264/x264_%(version)s.orig.tar.gz'
url = 'https://gstreamer.freedesktop.org/src/mirror/%(name)s_%(version)s.orig.tar.gz'
tarball_checksum = '41606cb8e788a7f8c4514290646d4ba5c7bc68d9e1ccd1a73f446a90546913eb'

licenses = [License.GPLv2Plus]
stype = SourceType.TARBALL
configure_tpl = "%(config-sh)s --prefix=%(prefix)s "\
"--libdir=%(libdir)s"
configure_options = '--enable-shared --enable-static --enable-pic ' \
'--disable-strip --disable-lavf'
url = 'https://download.videolan.org/pub/x264/snapshots/x264-snapshot-%(version)s-stable.tar.bz2'
tarball_dirname= 'x264-snapshot-%(version)s-stable'
tarball_checksum = 'b2495c8f2930167d470994b1ce02b0f4bfb24b3317ba36ba7f112e9809264160'

patches = [
f'{name}/0001-Add-Meson-build.patch',
]

meson_options = {}
patches = ['x264/0001-configure-Force-pkgconfig-file-to-have-relative-valu.patch']

files_libs = ['libx264']
files_bins = ['x264']
Expand All @@ -33,11 +25,48 @@ class Recipe(recipe.Recipe):
allow_parallel_build = False

def prepare(self):
# clang x86-32 fails at generating proper asm PIC code
# See bug https://bugzilla.gnome.org/show_bug.cgi?id=727079
enable_asm = True
AS = ['nasm']

arch = self.config.target_arch
if self.config.target_arch == Architecture.X86:
arch = 'i686'
if Architecture.is_arm(self.config.target_arch):
cc = self.get_env('CC')
if cc:
AS = [cc]
else:
AS = []
if self.config.target_platform in [Platform.IOS, Platform.DARWIN]:
if Architecture.is_arm(self.config.target_arch):
# x264 ships its own gas-preprocessor.pl
AS = ['tools/' + self.get_env('GAS')]
elif self.config.target_arch == Architecture.X86:
enable_asm = False

if self.config.target_platform == Platform.ANDROID:
self.meson_options['cli'] = 'false'
v = DistroVersion.get_android_api_version(self.config.target_distro_version)
# Don't build the cli on Android, it fails with NDK 16
self.configure_options += ' --disable-cli'
self.files_bins.remove('x264')
if self.config.target_arch in [Architecture.X86_64]:
# Fails linking into an android application
enable_asm = False
elif self.config.target_arch in [Architecture.X86] and v < 24:
# passing -mstackrealign consumes an extra register and will
# fail compliation.
# https://github.com/android-ndk/ndk/issues/690
# https://github.com/android-ndk/ndk/issues/693
enable_asm = False

self.set_env('AS', *AS)
if enable_asm is False:
self.configure_options += ' --disable-asm '

def post_install(self):
LibtoolLibrary('x264', 164, None, None, self.config.libdir,
self.config.target_platform).save()
libtool_la = LibtoolLibrary('x264', 148, None, None, self.config.libdir,
self.config.target_platform)
libtool_la.save()
super().post_install()
Loading
Loading