mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-22 12:01:27 +00:00
aedi: add brotli target
This commit is contained in:
parent
0d04ae835f
commit
82243ffea7
3 changed files with 27 additions and 0 deletions
|
@ -67,6 +67,7 @@ def targets():
|
||||||
ZMusicTarget(),
|
ZMusicTarget(),
|
||||||
|
|
||||||
# Libraries needed for other targets
|
# Libraries needed for other targets
|
||||||
|
BrotliTarget(),
|
||||||
DumbTarget(),
|
DumbTarget(),
|
||||||
ExpatTarget(),
|
ExpatTarget(),
|
||||||
FmtTarget(),
|
FmtTarget(),
|
||||||
|
|
|
@ -16,10 +16,35 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import glob
|
||||||
|
|
||||||
from .base import *
|
from .base import *
|
||||||
from ..state import BuildState
|
from ..state import BuildState
|
||||||
|
|
||||||
|
|
||||||
|
class BrotliTarget(CMakeStaticDependencyTarget):
|
||||||
|
def __init__(self, name='brotli'):
|
||||||
|
super().__init__(name)
|
||||||
|
|
||||||
|
def prepare_source(self, state: BuildState):
|
||||||
|
state.download_source(
|
||||||
|
'https://github.com/google/brotli/archive/refs/tags/v1.0.9.tar.gz',
|
||||||
|
'f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46')
|
||||||
|
|
||||||
|
def post_build(self, state: BuildState):
|
||||||
|
super().post_build(state)
|
||||||
|
|
||||||
|
dylib_pattern = str(state.install_path / 'lib/*.dylib')
|
||||||
|
for dylib in glob.iglob(dylib_pattern):
|
||||||
|
os.unlink(dylib)
|
||||||
|
|
||||||
|
archive_suffix = '-static.a'
|
||||||
|
archive_pattern = str(state.install_path / f'lib/*{archive_suffix}')
|
||||||
|
for archive in glob.iglob(archive_pattern):
|
||||||
|
no_suffix_name = archive.replace(archive_suffix, '.a')
|
||||||
|
os.rename(archive, no_suffix_name)
|
||||||
|
|
||||||
|
|
||||||
class DumbTarget(CMakeStaticDependencyTarget):
|
class DumbTarget(CMakeStaticDependencyTarget):
|
||||||
def __init__(self, name='dumb'):
|
def __init__(self, name='dumb'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
|
1
deps/.gitignore
vendored
1
deps/.gitignore
vendored
|
@ -40,6 +40,7 @@
|
||||||
/sndfile/include/sndfile.hh
|
/sndfile/include/sndfile.hh
|
||||||
|
|
||||||
# Libraries, tier 2
|
# Libraries, tier 2
|
||||||
|
/brotli/bin/
|
||||||
/freetype/lib/cmake/
|
/freetype/lib/cmake/
|
||||||
/lua/bin/
|
/lua/bin/
|
||||||
/lua/man/
|
/lua/man/
|
||||||
|
|
Loading…
Reference in a new issue