Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-lysiuk committed Dec 27, 2024
2 parents 2a9b55a + 829f4b5 commit 3090869
Show file tree
Hide file tree
Showing 88 changed files with 2,476 additions and 1,830 deletions.
1 change: 1 addition & 0 deletions aedi/target/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def targets():
DosBoxXTarget(),
DzipTarget(),
EricWToolsTarget(),
FFmpegTarget(),
GlslangTarget(),
GraphvizTarget(),
M4Target(),
Expand Down
16 changes: 8 additions & 8 deletions aedi/target/library_tier1.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def __init__(self, name='ffi'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/libffi/libffi/releases/download/v3.4.2/libffi-3.4.2.tar.gz',
'540fb721619a6aba3bdeef7d940d8e9e0e6d2c193595bc243241b77ff9e93620')
'https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz',
'b0dea9df23c863a7a50e825440f3ebffabd65df1497108e5d437747843895a4e')

def detect(self, state: BuildState) -> bool:
return state.has_source_file('libffi.pc.in')
Expand Down Expand Up @@ -307,8 +307,8 @@ def __init__(self, name='mpg123'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://www.mpg123.de/download/mpg123-1.32.7.tar.bz2',
'3c8919243707951cac0e3c39bbf28653bcaffc43c98ff16801a27350db8f0f21',
'https://www.mpg123.de/download/mpg123-1.32.10.tar.bz2',
'87b2c17fe0c979d3ef38eeceff6362b35b28ac8589fbf1854b5be75c9ab6557c',
patches=('mpg123-have-fpu', 'mpg123-no-syn123'))

def configure(self, state: BuildState):
Expand All @@ -335,8 +335,8 @@ def __init__(self, name='openal'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://openal-soft.org/openal-releases/openal-soft-1.23.1.tar.bz2',
'796f4b89134c4e57270b7f0d755f0fa3435b90da437b745160a49bd41c845b21')
'https://openal-soft.org/openal-releases/openal-soft-1.24.1.tar.bz2',
'0b9883d2e372d4ce66d37b142ab10b606a8a0ed3e873d1e070b1c878b695425a')

def configure(self, state: BuildState):
opts = state.options
Expand Down Expand Up @@ -447,8 +447,8 @@ def __init__(self, name='vpx'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/webmproject/libvpx/archive/refs/tags/v1.14.1.tar.gz',
'901747254d80a7937c933d03bd7c5d41e8e6c883e0665fadcb172542167c7977')
'https://github.com/webmproject/libvpx/archive/refs/tags/v1.15.0.tar.gz',
'e935eded7d81631a538bfae703fd1e293aad1c7fd3407ba00440c95105d2011e')

def detect(self, state: BuildState) -> bool:
return state.has_source_file('vpxstats.h')
Expand Down
22 changes: 8 additions & 14 deletions aedi/target/library_tier2.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,8 @@ def __init__(self, name='fluidsynth'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.3.6.tar.gz',
'3340d73286b28fe6e5150fbe12648d4640e86c64c228878b572773bd08cac531',
patches='fluidsynth-sf3-support')
'https://github.com/FluidSynth/fluidsynth/archive/refs/tags/v2.4.1.tar.gz',
'd1e64155ac902116ed3d4dea512719d8c04ab3877db2e8fb160284379f570a2f')

def configure(self, state: BuildState):
opts = state.options
Expand Down Expand Up @@ -302,8 +301,8 @@ def __init__(self, name='sdl2'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/libsdl-org/SDL/releases/download/release-2.30.8/SDL2-2.30.8.tar.gz',
'380c295ea76b9bd72d90075793971c8bcb232ba0a69a9b14da4ae8f603350058')
'https://github.com/libsdl-org/SDL/releases/download/release-2.30.10/SDL2-2.30.10.tar.gz',
'f59adf36a0fcf4c94198e7d3d776c1b3824211ab7aeebeb31fe19836661196aa')

def configure(self, state: BuildState):
opts = state.options
Expand All @@ -319,8 +318,8 @@ def __init__(self, name='sdl2_image'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-2.8.2.tar.gz',
'8f486bbfbcf8464dd58c9e5d93394ab0255ce68b51c5a966a918244820a76ddc')
'https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.4/SDL2_image-2.8.4.tar.gz',
'5a89a01420a192b89dbcc5f5267448181d5dcc81d2f5a1688cb1eac6f557da67')

def configure(self, state: BuildState):
opts = state.options
Expand All @@ -329,11 +328,6 @@ def configure(self, state: BuildState):

super().configure(state)

@staticmethod
def _process_pkg_config(pcfile: Path, line: str) -> str:
# Link with webpdemux library instead of webp
return line.replace('\n', 'demux\n') if line.startswith('Requires.private:') else line


class Sdl2MixerTarget(base.CMakeStaticDependencyTarget):
def __init__(self, name='sdl2_mixer'):
Expand Down Expand Up @@ -456,8 +450,8 @@ def __init__(self, name='webp'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.4.0.tar.gz',
'61f873ec69e3be1b99535634340d5bde750b2e4447caa1db9f61be3fd49ab1e5')
'https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.5.0.tar.gz',
'7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c')

def configure(self, state: BuildState):
option_suffices = (
Expand Down
1 change: 1 addition & 0 deletions aedi/target/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ def prepare_source(self, state: BuildState):
def configure(self, state: BuildState):
opts = state.options
opts['CMAKE_EXE_LINKER_FLAGS'] += state.run_pkg_config('--libs', 'ogg', 'SDL2')
opts['QUAKE_GENERATE_VERSION_HEADER'] = 'ON'
opts['QUAKE_MACOS_BUNDLE'] = 'OFF'
opts['QUAKE_MACOS_MOUSE_ACCELERATION'] = 'ON'

Expand Down
47 changes: 37 additions & 10 deletions aedi/target/tool_tier2.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,33 @@ def prepare_source(self, state: BuildState):
patches='ericw-tools-hardcode-version')


class FFmpegTarget(base.ConfigureMakeDependencyTarget):
# TODO: fix absolute paths in bin/* and lib/*
def __init__(self, name='ffmpeg'):
super().__init__(name)

def prepare_source(self, state: BuildState):
state.download_source(
'https://ffmpeg.org/releases/ffmpeg-7.1.tar.xz',
'40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6')

def detect(self, state: BuildState) -> bool:
return state.has_source_file('doc/ffmpeg.txt')

def configure(self, state: BuildState):
state.options['--arch'] = state.architecture()
super().configure(state)


class GlslangTarget(base.CMakeStaticDependencyTarget):
def __init__(self, name='glslang'):
super().__init__(name)

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/KhronosGroup/glslang/archive/refs/tags/15.0.0.tar.gz',
'c31c8c2e89af907507c0631273989526ee7d5cdf7df95ececd628fd7b811e064')
'https://github.com/KhronosGroup/glslang/archive/refs/tags/15.1.0.tar.gz',
'4bdcd8cdb330313f0d4deed7be527b0ac1c115ff272e492853a6e98add61b4bc',
patches='glslang-old-cmake')

def configure(self, state: BuildState):
args = ('python3', 'update_glslang_sources.py')
Expand Down Expand Up @@ -240,8 +259,8 @@ def __init__(self, name='radare2'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/radareorg/radare2/releases/download/5.9.4/radare2-5.9.4.tar.xz',
'edf4fc9255482ef790a85e1e563ecce147c6dc6ef49572586b3bb7fa6f1331b3')
'https://github.com/radareorg/radare2/releases/download/5.9.8/radare2-5.9.8.tar.xz',
'de061db6089cc1321ba9062b8aa9a0adaaa7a4d25128aab37a2a44e71a939829')

def detect(self, state: BuildState) -> bool:
return state.has_source_file('man/radare2.1')
Expand Down Expand Up @@ -272,8 +291,8 @@ def __init__(self, name='rizin'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://github.com/rizinorg/rizin/releases/download/v0.7.3/rizin-src-v0.7.3.tar.xz',
'e0ed25ada6be42098d38da9ccef4befbd549e477e80f8dffa5ca1b8ff9fbda74')
'https://github.com/rizinorg/rizin/releases/download/v0.7.4/rizin-src-v0.7.4.tar.xz',
'f7118910e5dc843c38baa3e00b30ec019a1cdd5c132ba2bc16cf0c7497631201')

def detect(self, state: BuildState) -> bool:
return state.has_source_file('binrz/man/rizin.1')
Expand All @@ -296,8 +315,8 @@ def __init__(self, name='7zip'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://7-zip.org/a/7z2406-src.tar.xz',
'2aa1660c773525b2ed84d6cd7ff0680c786ec0893b87e4db44654dcb7f5ac8b5')
'https://7-zip.org/a/7z2408-src.tar.xz',
'aa04aac906a04df59e7301f4c69e9f48808e6c8ecae4eb697703a47bfb0ac042')

def detect(self, state: BuildState) -> bool:
return state.has_source_file('CPP/7zip/cmpl_mac_arm64.mak')
Expand Down Expand Up @@ -378,8 +397,16 @@ def __init__(self, name='xz'):

def prepare_source(self, state: BuildState):
state.download_source(
'https://tukaani.org/xz/xz-5.4.5.tar.gz',
'135c90b934aee8fbc0d467de87a05cb70d627da36abe518c357a873709e5b7d6')
'https://github.com/tukaani-project/xz/releases/download/v5.6.3/xz-5.6.3.tar.xz',
'db0590629b6f0fa36e74aea5f9731dc6f8df068ce7b7bafa45301832a5eebc3a')

def configure(self, state: BuildState):
options = state.options
options['BUILD_TESTING'] += 'NO'
# Dependencies of libintl are not pulled automatically
options['CMAKE_EXE_LINKER_FLAGS'] += '-framework CoreFoundation -liconv'

super().configure(state)


class ZipTarget(base.SingleExeCTarget):
Expand Down
94 changes: 42 additions & 52 deletions deps/ffi/include/_aedi_arm64_ffi.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* -----------------------------------------------------------------*-C-*-
libffi 3.4.2
- Copyright (c) 2011, 2014, 2019, 2021 Anthony Green
libffi 3.4.6
- Copyright (c) 2011, 2014, 2019, 2021, 2022, 2024 Anthony Green
- Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc.
Permission is hereby granted, free of charge, to any person
Expand Down Expand Up @@ -56,6 +56,31 @@ extern "C" {

/* ---- System configuration information --------------------------------- */

/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if 0
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
#define FFI_TYPE_COMPLEX 15

/* This should always refer to the last type code (for sanity checks). */
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX

#include <ffitarget.h>

#ifndef LIBFFI_ASM
Expand Down Expand Up @@ -115,13 +140,11 @@ typedef struct _ffi_type
when using the static version of the library.
Besides, as a workaround, they can define FFI_BUILDING if they
*know* they are going to link with the static library. */
#if defined _MSC_VER
#if defined _MSC_VER && !defined(FFI_STATIC_BUILD)
# if defined FFI_BUILDING_DLL /* Building libffi.DLL with msvcc.sh */
# define FFI_API __declspec(dllexport)
# elif !defined FFI_BUILDING /* Importing libffi.DLL */
# else /* Importing libffi.DLL */
# define FFI_API __declspec(dllimport)
# else /* Building/linking static library */
# define FFI_API
# endif
#else
# define FFI_API
Expand Down Expand Up @@ -197,21 +220,12 @@ FFI_EXTERN ffi_type ffi_type_sint64;
FFI_EXTERN ffi_type ffi_type_float;
FFI_EXTERN ffi_type ffi_type_double;
FFI_EXTERN ffi_type ffi_type_pointer;

#if 0
FFI_EXTERN ffi_type ffi_type_longdouble;
#else
#define ffi_type_longdouble ffi_type_double
#endif

#ifdef FFI_TARGET_HAS_COMPLEX_TYPE
FFI_EXTERN ffi_type ffi_type_complex_float;
FFI_EXTERN ffi_type ffi_type_complex_double;
#if 0
FFI_EXTERN ffi_type ffi_type_complex_longdouble;
#else
#define ffi_type_complex_longdouble ffi_type_complex_double
#endif
#endif
#endif /* LIBFFI_HIDE_BASIC_TYPES */

Expand Down Expand Up @@ -320,6 +334,9 @@ typedef struct {
ffi_cif *cif;
void (*fun)(ffi_cif*,void*,void**,void*);
void *user_data;
#if defined(_MSC_VER) && defined(_M_IX86)
void *padding;
#endif
} ffi_closure
#ifdef __GNUC__
__attribute__((aligned (8)))
Expand All @@ -335,14 +352,6 @@ typedef struct {
FFI_API void *ffi_closure_alloc (size_t size, void **code);
FFI_API void ffi_closure_free (void *);

#if defined(PA_LINUX) || defined(PA_HPUX)
#define FFI_CLOSURE_PTR(X) ((void *)((unsigned int)(X) | 2))
#define FFI_RESTORE_PTR(X) ((void *)((unsigned int)(X) & ~3))
#else
#define FFI_CLOSURE_PTR(X) (X)
#define FFI_RESTORE_PTR(X) (X)
#endif

FFI_API ffi_status
ffi_prep_closure (ffi_closure*,
ffi_cif *,
Expand All @@ -360,7 +369,7 @@ ffi_prep_closure_loc (ffi_closure*,
ffi_cif *,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
void*codeloc);
void *codeloc);

#ifdef __sgi
# pragma pack 8
Expand All @@ -378,7 +387,7 @@ typedef struct {

/* If this is enabled, then a raw closure has the same layout
as a regular closure. We use this to install an intermediate
handler to do the transaltion, void** -> ffi_raw*. */
handler to do the translation, void** -> ffi_raw*. */

void (*translate_args)(ffi_cif*,void*,void**,void*);
void *this_closure;
Expand Down Expand Up @@ -446,7 +455,7 @@ ffi_prep_java_raw_closure_loc (ffi_java_raw_closure*,

#endif /* FFI_CLOSURES */

#if FFI_GO_CLOSURES
#ifdef FFI_GO_CLOSURES

typedef struct {
void *tramp;
Expand Down Expand Up @@ -489,38 +498,19 @@ FFI_API
ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type *struct_type,
size_t *offsets);

/* Useful for eliminating compiler warnings. */
/* Convert between closure and function pointers. */
#if defined(PA_LINUX) || defined(PA_HPUX)
#define FFI_FN(f) ((void (*)(void))((unsigned int)(f) | 2))
#define FFI_CL(f) ((void *)((unsigned int)(f) & ~3))
#else
#define FFI_FN(f) ((void (*)(void))f)
#define FFI_CL(f) ((void *)(f))
#endif

/* ---- Definitions shared with assembly code ---------------------------- */

#endif

/* If these change, update src/mips/ffitarget.h. */
#define FFI_TYPE_VOID 0
#define FFI_TYPE_INT 1
#define FFI_TYPE_FLOAT 2
#define FFI_TYPE_DOUBLE 3
#if 0
#define FFI_TYPE_LONGDOUBLE 4
#else
#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
#endif
#define FFI_TYPE_UINT8 5
#define FFI_TYPE_SINT8 6
#define FFI_TYPE_UINT16 7
#define FFI_TYPE_SINT16 8
#define FFI_TYPE_UINT32 9
#define FFI_TYPE_SINT32 10
#define FFI_TYPE_UINT64 11
#define FFI_TYPE_SINT64 12
#define FFI_TYPE_STRUCT 13
#define FFI_TYPE_POINTER 14
#define FFI_TYPE_COMPLEX 15

/* This should always refer to the last type code (for sanity checks). */
#define FFI_TYPE_LAST FFI_TYPE_COMPLEX

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 3090869

Please sign in to comment.