Changeset 264092 in webkit
- Timestamp:
- Jul 8, 2020, 3:41:54 AM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r264065 r264092 1 2020-07-08 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 [JHBuild] Add support for using a minimal moduleset 4 https://bugs.webkit.org/show_bug.cgi?id=213614 5 6 Reviewed by Carlos Garcia Campos. 7 8 This patch introduces a way of specifying a moduleset other than the default 9 via the environment variable WEBKIT_JHBUILD_MODULESET and adds a minimal moduleset 10 that allows building WebKit with it. This minimal moduleset includes the libraries 11 needed for building WebKit on Ubuntu-18.04, and those libraries are only build if 12 needed since they include the <pkg-config> entries that tells JHBuild to not build 13 them if those are already installed system wide. So this minimal moduleset should 14 work also on newer versions of Ubuntu or even other distributions. 15 16 Currently a recipe for newer libsoup than the one shipped by Ubuntu-18.04 is included 17 since we need this to have support for SameSite cookie support. 18 The minimal moduleset is shared between WPE and GTK to reduce code duplication. 19 20 To use this, you have to export on the build environment: 21 WEBKIT_JHBUILD=1 22 WEBKIT_JHBUILD_MODULESET=minimal 23 24 * Scripts/update-webkit-libs-jhbuild: 25 (getJhbuildIncludedFilePaths): 26 (jhbuildModulesetNameChanged): 27 (jhbuildConfigurationChanged): 28 (saveJhbuildMd5): 29 (saveJhbuildModulesetName): 30 (saveJhbuildConfig): 31 (deleteJhbuildMd5): 32 (deleteJhbuildModulesetName): 33 (deleteJhbuildConfig): 34 * Scripts/webkitdirs.pm: 35 (getJhbuildModulesetName): 36 * gtk/jhbuild-minimal.modules: Added. 37 * jhbuild/jhbuild-minimal.modules: Added. 38 * jhbuild/jhbuildrc_common.py: 39 (init): 40 * jhbuild/patches/libsoup-lower-glib-dependency-to-2.38.patch: Added. 41 * wpe/jhbuild-minimal.modules: Added. 42 1 43 2020-07-08 Philippe Normand <pnormand@igalia.com> 2 44 -
trunk/Tools/Scripts/update-webkit-libs-jhbuild
r260565 r264092 49 49 { 50 50 my $jhbuildFile = shift; 51 die "Can't find file $jhbuildFile" if ! -e $jhbuildFile; 51 52 my $dom = XML::LibXML->load_xml(location => $jhbuildFile); 52 53 my @includes; … … 96 97 } 97 98 99 sub jhbuildModulesetNameChanged() 100 { 101 my $jhBuildModulesetNameFile = join('/', getJhbuildPath(), $platform, 'moduleset.name'); 102 my $previousModulesetName; 103 open(my $FH, '<', $jhBuildModulesetNameFile) or return 1; 104 { 105 local $/; # localized slurp mode 106 $previousModulesetName = <$FH>; 107 } 108 close($FH); 109 return $previousModulesetName ne getJhbuildModulesetName(); 110 } 111 98 112 sub jhbuildConfigurationChanged() 99 113 { 100 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules');101 my @jhbuildFiles = qw(jhbuildrc jhbuild.modules);114 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, getJhbuildModulesetName()); 115 my @jhbuildFiles = ('jhbuildrc', getJhbuildModulesetName()); 102 116 push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain)); 103 117 … … 107 121 } 108 122 } 123 return jhbuildModulesetNameChanged(); 109 124 } 110 125 … … 126 141 # Save md5sum for jhbuild-related files.saveJhbuildMd5(); 127 142 my $jhbuildPath = getJhbuildPath(); 128 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules');129 my @jhbuildFiles = qw(jhbuildrc jhbuild.modules);143 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, getJhbuildModulesetName()); 144 my @jhbuildFiles = ('jhbuildrc', getJhbuildModulesetName()); 130 145 push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain)); 131 146 … … 134 149 saveMd5File($file); 135 150 } 151 } 152 153 sub saveJhbuildModulesetName() { 154 my $jhBuildPlatformDir = join('/', getJhbuildPath(), $platform); 155 (-d $jhBuildPlatformDir) || mkpath $jhBuildPlatformDir; 156 my $jhBuildModulesetNameFile = join('/', $jhBuildPlatformDir, 'moduleset.name'); 157 open(FH, '>', $jhBuildModulesetNameFile); 158 print FH getJhbuildModulesetName(); 159 close(FH); 160 } 161 162 sub saveJhbuildConfig() { 163 saveJhbuildMd5(); 164 saveJhbuildModulesetName(); 136 165 } 137 166 … … 142 171 } 143 172 144 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, 'jhbuild.modules');145 my @jhbuildFiles = qw(jhbuildrc jhbuild.modules);173 my $jhbuildMain = join('/', sourceDir(), 'Tools', $platform, getJhbuildModulesetName()); 174 my @jhbuildFiles = ('jhbuildrc', getJhbuildModulesetName()); 146 175 push(@jhbuildFiles, getJhbuildIncludedFilePaths($jhbuildMain)); 147 176 … … 150 179 unlink($md5File) if -e $md5File; 151 180 } 181 } 182 183 sub deleteJhbuildModulesetName() { 184 my $jhBuildModulesetNameFile = join('/', jhbuildPath, $platform, 'moduleset.name'); 185 unlink($jhBuildModulesetNameFile) if -e $jhBuildModulesetNameFile; 186 } 187 188 sub deleteJhbuildConfig() { 189 deleteJhbuildMd5(); 190 deleteJhbuildModulesetName(); 152 191 } 153 192 … … 194 233 print "Updating " . $prettyPlatform{$platform} . " port dependencies using jhbuild...\n"; 195 234 if (runJhbuild("build") == 0) { 196 saveJhbuild Md5();235 saveJhbuildConfig(); 197 236 } else { 198 deleteJhbuild Md5();237 deleteJhbuildConfig(); 199 238 die "Failed to build " . $prettyPlatform{$platform} . " port dependencies with jhbuild\n"; 200 239 } -
trunk/Tools/Scripts/webkitdirs.pm
r263742 r264092 2109 2109 } 2110 2110 2111 2112 sub getJhbuildModulesetName() 2113 { 2114 if (defined($ENV{'WEBKIT_JHBUILD_MODULESET'})) { 2115 return 'jhbuild-' . $ENV{'WEBKIT_JHBUILD_MODULESET'} . '.modules'; 2116 } 2117 return 'jhbuild.modules'; 2118 } 2119 2120 2111 2121 sub getUserFlatpakPath() 2112 2122 { -
trunk/Tools/jhbuild/jhbuildrc_common.py
r259867 r264092 44 44 jhbuildrc_globals["build_policy"] = 'updated' 45 45 46 __moduleset_file_uri = 'file://' + os.path.join(__tools_directory, 'jhbuild.modules') 46 __moduleset_file_name = 'jhbuild.modules' 47 if 'WEBKIT_JHBUILD_MODULESET' in os.environ: 48 __moduleset_file_name = 'jhbuild-%s.modules' % os.environ['WEBKIT_JHBUILD_MODULESET'] 49 __moduleset_file_path = os.path.join(__tools_directory, __moduleset_file_name) 50 if not os.path.isfile(__moduleset_file_path): 51 raise RuntimeError("Can't find the moduleset in path %s" % __moduleset_file_path) 52 __moduleset_file_uri = 'file://' + __moduleset_file_path 53 47 54 __extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",") 48 55 jhbuildrc_globals["moduleset"] = [__moduleset_file_uri, ] … … 51 58 52 59 __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") 53 jhbuildrc_globals["modules"] = ['webkit' + jhbuild_platform + '-testing-dependencies', ] 60 61 base_dependency_suffix = 'testing' 62 if 'WEBKIT_JHBUILD_MODULESET' in os.environ: 63 base_dependency_suffix = os.environ['WEBKIT_JHBUILD_MODULESET'] 64 65 jhbuildrc_globals["modules"] = ['webkit' + jhbuild_platform + '-' + base_dependency_suffix + '-dependencies', ] 54 66 if __extra_modules != ['']: 55 67 jhbuildrc_globals["modules"].extend(__extra_modules)
Note:
See TracChangeset
for help on using the changeset viewer.