remove obsolete Boost dependency
Boost makes building a piece of software much more difficult than necessary. It's a huge library, and just uncompressing it takes a considerable amount of time. MPD only used a tiny fraction of it, yet its header bloat made the MPD build very slow. Locating Boost was difficult due to its arcane build system and its resistance to use pkg-config; it's always a special case. MPD could never use features of newer Boost versions because Linux distributions always shipped old Boost versions. Boost made everything complicated and slow. So, finally, after getting rid of GLib (commitccdb94b06c
), switching to C++ and using Boost (commit0801b3f495
), we've finally get rid of it 8 years later. Unfortunately, I had to reimplement parts of it along the way (e.g. IntrusiveList). Kind of NIH, but on the other hand, compiling MPD has become much easier for users.
This commit is contained in:
@ -1,28 +0,0 @@
|
||||
import os, shutil
|
||||
import re
|
||||
|
||||
from build.project import Project
|
||||
|
||||
class BoostProject(Project):
|
||||
def __init__(self, url, md5, installed,
|
||||
**kwargs):
|
||||
m = re.match(r'.*/boost_(\d+)_(\d+)_(\d+)\.tar\.bz2$', url)
|
||||
version = "%s.%s.%s" % (m.group(1), m.group(2), m.group(3))
|
||||
Project.__init__(self, url, md5, installed,
|
||||
name='boost', version=version,
|
||||
**kwargs)
|
||||
|
||||
def _build(self, toolchain):
|
||||
src = self.unpack(toolchain)
|
||||
|
||||
# install the headers manually; don't build any library
|
||||
# (because right now, we only use header-only libraries)
|
||||
includedir = os.path.join(toolchain.install_prefix, 'include')
|
||||
dest = os.path.join(includedir, 'boost')
|
||||
shutil.rmtree(dest, ignore_errors=True)
|
||||
shutil.copytree(os.path.join(src, 'boost'), dest)
|
||||
|
||||
# touch the boost/version.hpp file to ensure it's newer than
|
||||
# the downloaded Boost tarball, to avoid reinstalling Boost on
|
||||
# every run
|
||||
os.utime(os.path.join(toolchain.install_prefix, self.installed))
|
@ -8,7 +8,6 @@ from build.cmake import CmakeProject
|
||||
from build.autotools import AutotoolsProject
|
||||
from build.ffmpeg import FfmpegProject
|
||||
from build.openssl import OpenSSLProject
|
||||
from build.boost import BoostProject
|
||||
from build.jack import JackProject
|
||||
|
||||
libmpdclient = MesonProject(
|
||||
@ -448,9 +447,3 @@ jack = JackProject(
|
||||
'38f674bbc57852a8eb3d9faa1f96a0912d26f7d5df14c11005ad499c8ae352f2',
|
||||
'lib/pkgconfig/jack.pc',
|
||||
)
|
||||
|
||||
boost = BoostProject(
|
||||
'https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2',
|
||||
'71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa',
|
||||
'include/boost/version.hpp',
|
||||
)
|
||||
|
@ -96,9 +96,6 @@ def configure(toolchain, src, build, args=()):
|
||||
|
||||
env = toolchain.env.copy()
|
||||
|
||||
# Meson 0.54 requires the BOOST_ROOT environment variable
|
||||
env['BOOST_ROOT'] = toolchain.install_prefix
|
||||
|
||||
subprocess.check_call(configure, env=env)
|
||||
|
||||
class MesonProject(Project):
|
||||
|
Reference in New Issue
Block a user