mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-21 19:41:15 +00:00
aedi: move brotli to tier 1
This commit is contained in:
parent
d91e8373c6
commit
ebfcf5b002
3 changed files with 29 additions and 29 deletions
|
@ -53,6 +53,7 @@ def targets():
|
||||||
QuakespasmExpTarget(),
|
QuakespasmExpTarget(),
|
||||||
|
|
||||||
# Libraries needed for GZDoom and Raze
|
# Libraries needed for GZDoom and Raze
|
||||||
|
BrotliTarget(),
|
||||||
Bzip2Target(),
|
Bzip2Target(),
|
||||||
FfiTarget(),
|
FfiTarget(),
|
||||||
FlacTarget(),
|
FlacTarget(),
|
||||||
|
@ -97,7 +98,6 @@ def targets():
|
||||||
XmpTarget(),
|
XmpTarget(),
|
||||||
|
|
||||||
# Obsolete libraries without binaries
|
# Obsolete libraries without binaries
|
||||||
BrotliTarget(),
|
|
||||||
ExpatTarget(),
|
ExpatTarget(),
|
||||||
FreeImageTarget(),
|
FreeImageTarget(),
|
||||||
FreeTypeTarget(),
|
FreeTypeTarget(),
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# 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
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -25,6 +26,33 @@ from ..state import BuildState
|
||||||
from . import base
|
from . import base
|
||||||
|
|
||||||
|
|
||||||
|
class BrotliTarget(base.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)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
||||||
|
return line.replace('-R${libdir} ', '') if line.startswith('Libs:') else line
|
||||||
|
|
||||||
|
|
||||||
class Bzip2Target(base.MakeTarget):
|
class Bzip2Target(base.MakeTarget):
|
||||||
def __init__(self, name='bzip2'):
|
def __init__(self, name='bzip2'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
# 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
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
@ -25,33 +24,6 @@ from ..state import BuildState
|
||||||
from . import base
|
from . import base
|
||||||
|
|
||||||
|
|
||||||
class BrotliTarget(base.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)
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def _process_pkg_config(pcfile: Path, line: str) -> str:
|
|
||||||
return line.replace('-R${libdir} ', '') if line.startswith('Libs:') else line
|
|
||||||
|
|
||||||
|
|
||||||
class ExpatTarget(base.CMakeStaticDependencyTarget):
|
class ExpatTarget(base.CMakeStaticDependencyTarget):
|
||||||
def __init__(self, name='expat'):
|
def __init__(self, name='expat'):
|
||||||
super().__init__(name)
|
super().__init__(name)
|
||||||
|
|
Loading…
Reference in a new issue