Skip to content
Merged
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
2 changes: 2 additions & 0 deletions gvsbuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ def __get_projects_to_build(opts):
if name == "all":
for proj in Project.list_projects():
if proj.type == ProjectType.PROJECT:
for dep in proj.all_dependencies:
to_build.add(dep)
to_build.add(proj)
p = Project.get_project(name)
if opts.deps:
Expand Down
12 changes: 0 additions & 12 deletions gvsbuild/patches/check-libs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,6 @@ if glib_dep.found()
test('glib', test_glib)
endif

# jasper
jasper_required_ver = '>= 2.0.12'
jasper_dep = dependency('jasper', version: jasper_required_ver, required: check_all)
if jasper_dep.found()
test_jasper = executable('test_jasper',
[ 'test_jasper.c', 'check_utils.c', ],
dependencies: [ jasper_dep, ],
)

test('jasper', test_jasper)
endif

# json-glib
json_glib_required_ver = '>= 1.4.2'
json_glib_dep = dependency('json-glib-1.0', version: json_glib_required_ver, required: check_all)
Expand Down
11 changes: 0 additions & 11 deletions gvsbuild/patches/check-libs/test_jasper.c

This file was deleted.

7 changes: 6 additions & 1 deletion gvsbuild/projects/abseil.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def __init__(self):
def build(self):
CmakeProject.build(
self,
cmake_params=r"-DBUILD_SHARED_LIBS=ON -DABSL_PROPAGATE_CXX_STD=ON -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_STANDARD_REQUIRED=ON",
cmake_params=[
"-DBUILD_SHARED_LIBS=ON",
"-DABSL_PROPAGATE_CXX_STD=ON",
"-DCMAKE_CXX_STANDARD=17",
"-DCMAKE_CXX_STANDARD_REQUIRED=ON",
],
use_ninja=True,
)
2 changes: 1 addition & 1 deletion gvsbuild/projects/atkmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ def __init__(self):
)

def build(self):
Meson.build(self, meson_params="-Dbuild-documentation=false")
Meson.build(self, meson_params=["-Dbuild-documentation=false"])
self.install(r".\COPYING share\doc\atkmm-1.6")
6 changes: 4 additions & 2 deletions gvsbuild/projects/cairomm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def __init__(self):

def build(self):
Meson.build(
self, meson_params="-Dbuild-examples=false -Dbuild-documentation=false"
self,
meson_params=["-Dbuild-examples=false", "-Dbuild-documentation=false"],
)
self.install(r".\COPYING share\doc\cairomm")

Expand All @@ -54,6 +55,7 @@ def __init__(self):

def build(self):
Meson.build(
self, meson_params="-Dbuild-examples=false -Dbuild-documentation=false"
self,
meson_params=["-Dbuild-examples=false", "-Dbuild-documentation=false"],
)
self.install(r".\COPYING share\doc\cairomm-1.0")
1 change: 1 addition & 0 deletions gvsbuild/projects/check_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def __init__(self):
"libyuv",
"pango",
"zlib",
"wing",
],
version="0.1.0",
internal=True,
Expand Down
39 changes: 23 additions & 16 deletions gvsbuild/projects/cyrus_sasl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

from pathlib import Path

from gvsbuild.utils.base_expanders import Tarball
from gvsbuild.utils.base_project import Project, project_add

Expand Down Expand Up @@ -41,22 +43,27 @@ def build(self):
"Debug" if self.builder.opts.configuration == "debug" else "Release"
)
gssapilib = "gssapi32.lib" if self.builder.x86 else "gssapi64.lib"
self.exec_vs(
r'nmake /nologo /f NTMakefile SASLDB="LMDB" LMDB_INCLUDE="%(gtk_dir)s\include" LMDB_LIBPATH="%(gtk_dir)s\lib" '
+ r'GSSAPI="MITKerberos" GSSAPILIB="'
+ gssapilib
+ r'" GSSAPI_INCLUDE="%(gtk_dir)s\include" GSSAPI_LIBPATH="%(gtk_dir)s\lib" '
+ r'OPENSSL_INCLUDE="%(gtk_dir)s\include" OPENSSL_LIBPATH="%(gtk_dir)s\lib" prefix="%(pkg_dir)s" CFG='
+ configuration
)
self.exec_vs(
r'nmake /nologo /f NTMakefile install SASLDB="LMDB" LMDB_INCLUDE="%(gtk_dir)s\include" '
+ r'GSSAPI="MITKerberos" GSSAPILIB="'
+ gssapilib
+ r'" GSSAPI_INCLUDE="%(gtk_dir)s\include" GSSAPI_LIBPATH="%(gtk_dir)s\lib" '
+ r'LMDB_LIBPATH="%(gtk_dir)s\lib" OPENSSL_INCLUDE="%(gtk_dir)s\include" OPENSSL_LIBPATH="%(gtk_dir)s\lib" prefix="%(pkg_dir)s" CFG='
+ configuration
)
gtk = Path(self.builder.gtk_dir)
inc = gtk / "include"
lib = gtk / "lib"
common_params = [
"/nologo",
"/f",
"NTMakefile",
"SASLDB=LMDB",
f"LMDB_INCLUDE={inc}",
f"LMDB_LIBPATH={lib}",
"GSSAPI=MITKerberos",
f"GSSAPILIB={gssapilib}",
f"GSSAPI_INCLUDE={inc}",
f"GSSAPI_LIBPATH={lib}",
f"OPENSSL_INCLUDE={inc}",
f"OPENSSL_LIBPATH={lib}",
f"prefix={self.pkg_dir}",
f"CFG={configuration}",
]
self.exec_vs(["nmake"] + common_params)
self.exec_vs(["nmake", "install"] + common_params)

self.install(r".\COPYING share\doc\cyrus-sasl")
self.install_pc_files()
7 changes: 5 additions & 2 deletions gvsbuild/projects/dev_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

import os

from gvsbuild.utils.base_project import Project, ProjectType, project_add
from gvsbuild.utils.simple_ui import log

Expand Down Expand Up @@ -62,12 +64,13 @@ def build(self):
if self.meson:
# Add a _meson env to use it directly
meson_path = Project.get_tool_path("meson")
self.builder.mod_env("_MESON", f"python {meson_path}\\meson.py")
meson_py = os.path.join(meson_path, "meson.py")
self.builder.mod_env("_MESON", f'python "{meson_py}"')
print("If you need to use meson you can use the _MESON environment, e.g.")
print("%_MESON% configure")
print("")

# If you need to use it as a --prefix in some build test ...
self.builder.mod_env("GTK_BASE_DIR", self.builder.gtk_dir)
self.builder.mod_env("PROMPT", "[ gvsbuild shell ] $P $G", subst=True)
self.builder.exec_vs("cmd", working_dir=self.builder.working_dir)
self.builder.exec_vs(["cmd"], working_dir=self.builder.working_dir)
2 changes: 1 addition & 1 deletion gvsbuild/projects/directx_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(self):
)

def build(self):
Meson.build(self, meson_params="-Dbuild-test=false")
Meson.build(self, meson_params=["-Dbuild-test=false"])
self.install(r".\LICENSE share\doc\directx-headers")

def post_install(self):
Expand Down
22 changes: 14 additions & 8 deletions gvsbuild/projects/enchant.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

from pathlib import Path

from gvsbuild.utils.base_expanders import Tarball
from gvsbuild.utils.base_project import Project, project_add

Expand All @@ -31,15 +33,19 @@ def __init__(self):
)

def build(self):
x64_param = "X64=1" if self.builder.x64 else ""
self.push_location(r".\src")

# Exec nmake /nologo -f makefile.mak clean
self.exec_vs(
r"nmake /nologo -f makefile.mak DLL=1 "
+ x64_param
+ r" MFLAGS=-MD GLIBDIR=%(gtk_dir)s\include\glib-2.0"
)
cmd = [
"nmake",
"/nologo",
"-f",
"makefile.mak",
"DLL=1",
"MFLAGS=-MD",
f"GLIBDIR={Path(self.builder.gtk_dir) / 'include' / 'glib-2.0'}",
]
if self.builder.x64:
cmd.append("X64=1")
self.exec_vs(cmd)

self.pop_location()

Expand Down
22 changes: 14 additions & 8 deletions gvsbuild/projects/ffmpeg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

import os
from pathlib import Path

from gvsbuild.utils.base_expanders import Tarball
from gvsbuild.utils.base_project import Project, project_add
Expand Down Expand Up @@ -49,14 +49,17 @@ def build(self):
else self.opts.configuration
)
msys_path = Project.get_tool_path("msys2")
bash = str(Path(msys_path) / "bash")
gpl_flag = "enable_gpl" if self.opts.ffmpeg_enable_gpl else "disable_gpl"
self.exec_vs(
r"{}\bash build\build.sh {} {} {} {}".format(
msys_path,
[
bash,
r"build\build.sh",
convert_to_msys(self.pkg_dir),
convert_to_msys(self.builder.gtk_dir),
configuration,
"enable_gpl" if self.opts.ffmpeg_enable_gpl else "disable_gpl",
),
gpl_flag,
],
add_path=msys_path,
)

Expand All @@ -82,7 +85,7 @@ def post_install(self):
]:
self.builder.exec_msys(
["mv", lib, "../lib/"],
working_dir=os.path.join(self.builder.gtk_dir, "bin"),
working_dir=Path(self.builder.gtk_dir) / "bin",
)


Expand All @@ -99,6 +102,9 @@ def __init__(self):
)

def build(self):
add_path = os.path.join(self.builder.opts.msys_dir, "usr", "bin")
add_path = Path(self.builder.opts.msys_dir) / "usr" / "bin"

self.exec_vs(r'make install PREFIX="%(gtk_dir)s"', add_path=add_path)
self.exec_vs(
["make", "install", f"PREFIX={self.builder.gtk_dir}"],
add_path=add_path,
)
4 changes: 3 additions & 1 deletion gvsbuild/projects/freerdp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def __init__(self):

def build(self):
CmakeProject.build(
self, use_ninja=True, cmake_params="-DWITH_SSE2=ON -DCHANNEL_URBDRC=OFF"
self,
use_ninja=True,
cmake_params=["-DWITH_SSE2=ON", "-DCHANNEL_URBDRC=OFF"],
)

self.install(r".\LICENSE share\doc\freerdp")
2 changes: 1 addition & 1 deletion gvsbuild/projects/fribidi.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ def __init__(self):
)

def build(self):
Meson.build(self, meson_params="-Ddocs=false")
Meson.build(self, meson_params=["-Ddocs=false"])
self.install(r".\COPYING share\doc\fribidi")
5 changes: 4 additions & 1 deletion gvsbuild/projects/gdk_pixbuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

from pathlib import Path

from gvsbuild.utils.base_builders import Meson
from gvsbuild.utils.base_expanders import Tarball
from gvsbuild.utils.base_project import Project, project_add
Expand Down Expand Up @@ -53,4 +55,5 @@ def build(self):
self.install(r".\COPYING share\doc\gdk-pixbuf")

def post_install(self):
self.exec_cmd(r"%(gtk_dir)s\bin\gdk-pixbuf-query-loaders.exe --update-cache")
exe = Path(self.builder.gtk_dir) / "bin" / "gdk-pixbuf-query-loaders.exe"
self.exec_cmd([exe, "--update-cache"])
18 changes: 14 additions & 4 deletions gvsbuild/projects/gettext.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

import os
import sys
from pathlib import Path

from gvsbuild.utils.base_expanders import Tarball
from gvsbuild.utils.base_project import Project, project_add
Expand All @@ -39,10 +40,19 @@ def __init__(self):
)

def build(self):
python_exe = Path(sys.executable).parent / "python.exe"
self.push_location(r".\nmake")
self.exec_vs(
r'nmake /nologo /f Makefile.vc CFG=%(configuration)s PYTHON="%(python_dir)s\python.exe" PREFIX="%(gtk_dir)s"',
add_path=os.path.join(self.builder.opts.msys_dir, "usr", "bin"),
[
"nmake",
"/nologo",
"/f",
"Makefile.vc",
f"CFG={self.builder.opts.configuration}",
f"PYTHON={python_exe}",
f"PREFIX={self.builder.gtk_dir}",
],
add_path=Path(self.builder.opts.msys_dir) / "usr" / "bin",
)
self.pop_location()

Expand Down Expand Up @@ -92,5 +102,5 @@ def build(self):
def post_install(self):
self.builder.exec_msys(
["mv", "libgnuintl.h", "libintl.h"],
working_dir=os.path.join(self.builder.gtk_dir, "include"),
working_dir=Path(self.builder.gtk_dir) / "include",
)
11 changes: 8 additions & 3 deletions gvsbuild/projects/glib.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def build(self):
build_debug = (
"enabled" if self.builder.opts.configuration == "debug" else "disabled"
)
Meson.build(self, meson_params=f"-Dglib_debug={build_debug}")
Meson.build(self, meson_params=[f"-Dglib_debug={build_debug}"])
self.install(r".\LICENSES\* share\doc\glib")


Expand Down Expand Up @@ -85,7 +85,7 @@ def build(self):
build_debug = (
"enabled" if self.builder.opts.configuration == "debug" else "disabled"
)
Meson.build(self, meson_params=f"-Dglib_debug={build_debug}")
Meson.build(self, meson_params=[f"-Dglib_debug={build_debug}"])


@project_add
Expand All @@ -112,7 +112,12 @@ def __init__(self):

def build(self):
Meson.build(
self, meson_params="-Dgnutls=disabled -Dopenssl=enabled -Dlibproxy=disabled"
self,
meson_params=[
"-Dgnutls=disabled",
"-Dopenssl=enabled",
"-Dlibproxy=disabled",
],
)
self.install(r".\COPYING share\doc\glib-networking")
self.install(r".\LICENSE_EXCEPTION share\doc\glib-networking")
Expand Down
5 changes: 3 additions & 2 deletions gvsbuild/projects/glibmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self):
def build(self):
Meson.build(
self,
meson_params="-Dbuild-examples=false -Dbuild-documentation=false",
meson_params=["-Dbuild-examples=false", "-Dbuild-documentation=false"],
)

self.install(r".\COPYING share\doc\glibmm")
Expand All @@ -65,7 +65,8 @@ def __init__(self):

def build(self):
Meson.build(
self, meson_params="-Dbuild-examples=false -Dbuild-documentation=false"
self,
meson_params=["-Dbuild-examples=false", "-Dbuild-documentation=false"],
)

self.install(r".\COPYING share\doc\glibmm-2.4")
5 changes: 4 additions & 1 deletion gvsbuild/projects/gobject_introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,8 @@ def build(self):

Meson.build(
self,
meson_params=f'-Dpython="{py_dir}\\python.exe" -Dcairo_libname=cairo-gobject-2.dll',
meson_params=[
f"-Dpython={py_dir}\\python.exe",
"-Dcairo_libname=cairo-gobject-2.dll",
],
)
Loading
Loading