diff options
Diffstat (limited to 'www/chromium/Makefile')
| -rw-r--r-- | www/chromium/Makefile | 344 |
1 files changed, 0 insertions, 344 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile deleted file mode 100644 index 13b13ff..0000000 --- a/www/chromium/Makefile +++ /dev/null | |||
| @@ -1,344 +0,0 @@ | |||
| 1 | BROKEN-powerpc64 = Check failed: false. OS architecture not handled. (powerpc64) | ||
| 2 | |||
| 3 | USE_WXNEEDED= Yes | ||
| 4 | |||
| 5 | DPB_PROPERTIES= parallel parallel2 | ||
| 6 | |||
| 7 | COMMENT= Chromium browser | ||
| 8 | |||
| 9 | V= 100.0.4896.75 | ||
| 10 | |||
| 11 | DISTNAME= chromium-${V} | ||
| 12 | |||
| 13 | DISTFILES+= ${EXTRACT_ONLY} \ | ||
| 14 | ${REGRESS_DISTFILES} | ||
| 15 | |||
| 16 | REGRESS_DISTFILES+= chromium-${V}-testdata${EXTRACT_SUFX} \ | ||
| 17 | test_fonts-cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb.tar.gz:0 \ | ||
| 18 | ${V}-1.tar.gz:1 | ||
| 19 | |||
| 20 | EXTRACT_ONLY= chromium-${V}${EXTRACT_SUFX} | ||
| 21 | |||
| 22 | CATEGORIES= www | ||
| 23 | |||
| 24 | HOMEPAGE= https://www.chromium.org/Home | ||
| 25 | |||
| 26 | MAINTAINER= Robert Nagy <robert@openbsd.org> | ||
| 27 | |||
| 28 | EXTRACT_SUFX= .tar.xz | ||
| 29 | |||
| 30 | FLAVORS= component ungoogled | ||
| 31 | PSEUDO_FLAVORS= debug | ||
| 32 | FLAVOR?= | ||
| 33 | |||
| 34 | # BSD-like | ||
| 35 | PERMIT_PACKAGE = Yes | ||
| 36 | |||
| 37 | MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ | ||
| 38 | MASTER_SITES0= http://nerd.hu/distfiles/ | ||
| 39 | MASTER_SITES1= https://codeberg.org/eloston/ungoogled-chromium/archive/ | ||
| 40 | |||
| 41 | MODULES= lang/python | ||
| 42 | |||
| 43 | COMPILER = base-clang ports-clang ports-gcc | ||
| 44 | |||
| 45 | MODPY_RUNDEP= No | ||
| 46 | MODPY_SETUPTOOLS= Yes | ||
| 47 | |||
| 48 | PATCHORIG= .orig.port | ||
| 49 | |||
| 50 | # uses pledge() | ||
| 51 | WANTLIB += X11 Xext Xfixes Xrender c dbus-1 event | ||
| 52 | WANTLIB += execinfo Xft | ||
| 53 | WANTLIB += gdk_pixbuf-2.0 glib-2.0 gobject-2.0 | ||
| 54 | WANTLIB += m | ||
| 55 | WANTLIB += kvm pthread | ||
| 56 | WANTLIB += xslt | ||
| 57 | WANTLIB += sndio | ||
| 58 | WANTLIB += ${COMPILER_LIBCXX} | ||
| 59 | WANTLIB += Xi Xtst | ||
| 60 | WANTLIB += Xcursor Xrandr gio-2.0 | ||
| 61 | WANTLIB += nspr4 nss3 nssutil3 smime3 | ||
| 62 | WANTLIB += atk-bridge-2.0 | ||
| 63 | WANTLIB += X11-xcb xcb | ||
| 64 | WANTLIB += GL expat | ||
| 65 | WANTLIB += atk-1.0 cairo gdk-3 gtk-3 pango-1.0 | ||
| 66 | WANTLIB += pangocairo-1.0 | ||
| 67 | WANTLIB += Xcomposite Xdamage | ||
| 68 | WANTLIB += EGL Xau Xdmcp Xinerama Xxf86vm atspi cairo-gobject | ||
| 69 | WANTLIB += drm epoxy fontconfig freetype fribidi gmodule-2.0 graphite2 | ||
| 70 | WANTLIB += gthread-2.0 intl pangoft2-1.0 pcre pixman-1 | ||
| 71 | WANTLIB += plc4 plds4 util xcb-dri2 xcb-glx xcb-render xcb-shm | ||
| 72 | WANTLIB += xml2 z | ||
| 73 | WANTLIB += harfbuzz harfbuzz-subset harfbuzz-gobject | ||
| 74 | WANTLIB += ffi png | ||
| 75 | WANTLIB += iconv lzma | ||
| 76 | WANTLIB += fido2 cbor usbhid crypto | ||
| 77 | WANTLIB += gbm xkbcommon | ||
| 78 | WANTLIB += tiff xshmfence | ||
| 79 | WANTLIB += lzo2 | ||
| 80 | |||
| 81 | RUN_DEPENDS= devel/xdg-utils \ | ||
| 82 | devel/desktop-file-utils \ | ||
| 83 | graphics/libexif \ | ||
| 84 | x11/gtk+3,-guic | ||
| 85 | BUILD_DEPENDS= archivers/bzip2 \ | ||
| 86 | devel/gperf \ | ||
| 87 | devel/bison \ | ||
| 88 | lang/node \ | ||
| 89 | shells/bash \ | ||
| 90 | sysutils/flock \ | ||
| 91 | sysutils/pciutils \ | ||
| 92 | devel/ninja \ | ||
| 93 | x11/gtk+3 \ | ||
| 94 | x11/py-xcbgen${MODPY_FLAVOR} \ | ||
| 95 | ${MODGCC4_CPPDEP} | ||
| 96 | LIB_DEPENDS= devel/harfbuzz \ | ||
| 97 | graphics/tiff \ | ||
| 98 | security/nss \ | ||
| 99 | textproc/libxslt \ | ||
| 100 | x11/gtk+3 \ | ||
| 101 | x11/xkbcommon \ | ||
| 102 | ${MODGCC4_CPPLIBDEP} | ||
| 103 | |||
| 104 | .include <bsd.own.mk> | ||
| 105 | |||
| 106 | # Set BUILDTYPE to Release | ||
| 107 | BUILDTYPE= Release | ||
| 108 | |||
| 109 | SUBST_VARS+= WRKSRC WRKDIR DEBUGFLAG | ||
| 110 | |||
| 111 | ALL_TARGET= chrome | ||
| 112 | TEST_TARGET= base_unittests \ | ||
| 113 | blink_unittests \ | ||
| 114 | chromedriver_unittests \ | ||
| 115 | components_unittests \ | ||
| 116 | content_unittests \ | ||
| 117 | crypto_unittests \ | ||
| 118 | gl_tests \ | ||
| 119 | gpu_unittests \ | ||
| 120 | headless_unittests \ | ||
| 121 | media_unittests \ | ||
| 122 | mojo_unittests \ | ||
| 123 | net_unittests \ | ||
| 124 | printing_unittests \ | ||
| 125 | skia_unittests \ | ||
| 126 | url_unittests \ | ||
| 127 | wm_unittests | ||
| 128 | |||
| 129 | DIST_TARGET_DIR= chrome | ||
| 130 | |||
| 131 | CONFIGURE_STYLE=none # prevent python MODULE from overriding do-build | ||
| 132 | |||
| 133 | BUILDDIR= ${WRKSRC}/out/${BUILDTYPE} | ||
| 134 | |||
| 135 | UNGOOGLED= ${WRKDIST}/ungoogled-chromium | ||
| 136 | |||
| 137 | # These libraries are used from the system and the build infrastructure | ||
| 138 | # removes them from the bundled third_party directory and replaces them | ||
| 139 | # with hooks to use them from the system. | ||
| 140 | GN_SYSTEM_LIBS= libevent \ | ||
| 141 | libxslt | ||
| 142 | |||
| 143 | GN_ARGS= enable_nacl=false \ | ||
| 144 | is_official_build=false \ | ||
| 145 | is_debug=false \ | ||
| 146 | is_cfi=false \ | ||
| 147 | optimize_webui=true \ | ||
| 148 | enable_js_type_check=false \ | ||
| 149 | enable_one_click_signin=true \ | ||
| 150 | enable_remoting=false \ | ||
| 151 | enable_hangout_services_extension=true \ | ||
| 152 | use_kerberos=false \ | ||
| 153 | use_sndio=true \ | ||
| 154 | use_cups=false \ | ||
| 155 | use_system_libdrm=true \ | ||
| 156 | use_bundled_fontconfig=false \ | ||
| 157 | use_system_harfbuzz=true \ | ||
| 158 | use_system_freetype=false \ | ||
| 159 | use_gnome_keyring=false \ | ||
| 160 | is_clang=true \ | ||
| 161 | use_sysroot=false \ | ||
| 162 | treat_warnings_as_errors=false \ | ||
| 163 | clang_use_chrome_plugins=false \ | ||
| 164 | use_allocator=\"none\" \ | ||
| 165 | use_allocator_shim=false \ | ||
| 166 | disable_fieldtrial_testing_config=true \ | ||
| 167 | extra_cppflags=\"-idirafter ${LOCALBASE}/include -idirafter ${X11BASE}/include\" \ | ||
| 168 | fatal_linker_warnings=false \ | ||
| 169 | use_custom_libcxx=false \ | ||
| 170 | enable_wmax_tokens=false \ | ||
| 171 | use_thin_lto=false \ | ||
| 172 | thin_lto_enable_optimizations=false \ | ||
| 173 | use_udev=false | ||
| 174 | |||
| 175 | # notyet | ||
| 176 | GN_ARGS+= use_vaapi=false | ||
| 177 | |||
| 178 | .if ${MACHINE_ARCH} == "i386" | ||
| 179 | GN_ARGS+= extra_ldflags=\"-L${LOCALBASE}/lib -L${X11BASE}/lib -Wl,--no-keep-memory\" | ||
| 180 | .else | ||
| 181 | GN_ARGS+= extra_ldflags=\"-L${LOCALBASE}/lib -L${X11BASE}/lib\" | ||
| 182 | .endif | ||
| 183 | |||
| 184 | .if ${MACHINE_ARCH} == "aarch64" | ||
| 185 | PKG_ARGS+= -Dswiftshader=0 | ||
| 186 | .else | ||
| 187 | PKG_ARGS+= -Dswiftshader=1 | ||
| 188 | .endif | ||
| 189 | |||
| 190 | # Note: these keys are for OpenBSD use ONLY. For your own distribution, | ||
| 191 | # please get your own set of keys. It's free! | ||
| 192 | GN_ARGS+= google_api_key="0" \ | ||
| 193 | ffmpeg_branding=\"Chromium\" \ | ||
| 194 | proprietary_codecs=false | ||
| 195 | |||
| 196 | # These are now restricted to use by Google, so bye-bye sync. | ||
| 197 | #GN_ARGS+= google_default_client_id=\"451220141585.apps.googleusercontent.com\" | ||
| 198 | #GN_ARGS+= google_default_client_secret=\"nQcDyaBvDyCeDrsRqKIWSHJn\" \ | ||
| 199 | |||
| 200 | # XXX dwz doesn't work with chromium yet | ||
| 201 | DWZ = : | ||
| 202 | |||
| 203 | .if ${FLAVOR:Mdebug} | ||
| 204 | GN_ARGS+= symbol_level=1 | ||
| 205 | DEBUG_PACKAGES= ${BUILD_PACKAGES} | ||
| 206 | .else | ||
| 207 | GN_ARGS+= symbol_level=0 | ||
| 208 | .endif | ||
| 209 | |||
| 210 | .if ${FLAVOR:Mcomponent} | ||
| 211 | GN_ARGS+= is_component_build=true | ||
| 212 | .else | ||
| 213 | GN_ARGS+= is_component_build=false | ||
| 214 | .endif | ||
| 215 | |||
| 216 | .if ${FLAVOR:Mungoogled} | ||
| 217 | GN_ARGS+= build_with_tflite_lib=false \ | ||
| 218 | chrome_pgo_phase=0 \ | ||
| 219 | enable_hangout_services_extension=false \ | ||
| 220 | enable_mdns=false \ | ||
| 221 | enable_one_click_signin=false \ | ||
| 222 | enable_reading_list=false \ | ||
| 223 | enable_reporting=false \ | ||
| 224 | enable_service_discovery=false \ | ||
| 225 | enable_widevine=false \ | ||
| 226 | exclude_unwind_tables=true \ | ||
| 227 | google_default_client_id="0" \ | ||
| 228 | google_default_client_secret="0" \ | ||
| 229 | safe_browsing_mode=0 \ | ||
| 230 | use_official_google_api_keys=false \ | ||
| 231 | use_unofficial_version_number=false | ||
| 232 | .endif | ||
| 233 | |||
| 234 | pre-configure: | ||
| 235 | @ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python | ||
| 236 | .for _arch in x64 ia32 arm64 | ||
| 237 | . for _dir in avcodec avformat avutil | ||
| 238 | @cp -pR ${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/linux/${_arch}/lib${_dir} \ | ||
| 239 | ${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/openbsd/${_arch}/lib${_dir} | ||
| 240 | . endfor | ||
| 241 | .endfor | ||
| 242 | @mkdir -p ${WRKSRC}/third_party/node/openbsd/node-openbsd/bin | ||
| 243 | @ln -sf ${TRUEPREFIX}/bin/node ${WRKSRC}/third_party/node/openbsd/node-openbsd/bin/node | ||
| 244 | ${SUBST_CMD} ${WRKSRC}/build/gn_run_binary.py ${WRKSRC}/v8/tools/run.py \ | ||
| 245 | ${WRKSRC}/tools/protoc_wrapper/protoc_wrapper.py \ | ||
| 246 | ${WRKSRC}/third_party/blink/renderer/build/scripts/run_with_pythonpath.py \ | ||
| 247 | ${WRKSRC}/base/third_party/libevent/BUILD.gn | ||
| 248 | |||
| 249 | # Configuration consists of three steps: | ||
| 250 | # 1. replace the specified bundled libraries with hooks to use the system libs | ||
| 251 | # 2. bootstrap gn, the tool to generate ninja files | ||
| 252 | # 3. run gn with the appropriate configuration arguments | ||
| 253 | do-configure: | ||
| 254 | .if ${FLAVOR:Mungoogled} | ||
| 255 | @mkdir -p ${UNGOOGLED} | ||
| 256 | @${GZIP_CMD} -d <${FULLDISTDIR}/${V}-1.tar.gz | ${TAR} -C ${UNGOOGLED}/.. -xf - | ||
| 257 | # @cd ${UNGOOGLED} && env -i ${MAKE_ENV} ./utils/prune_binaries.py ${WRKSRC} pruning.list | ||
| 258 | @sed -i "s/, '--no-backup-if-mismatch'//g" ${UNGOOGLED}/utils/patches.py | ||
| 259 | @sed -i "s/, check=True/, check=False/g" ${UNGOOGLED}/utils/patches.py | ||
| 260 | @cd ${UNGOOGLED} && env -i ${MAKE_ENV} ./utils/patches.py apply ${WRKSRC} patches | ||
| 261 | @find ${WRKSRC} -name '*.rej' -exec rm -f {} \; | ||
| 262 | @find ${WRKSRC} -name '*.orig' -exec rm -f {} \; | ||
| 263 | @rm -f ${UNGOOGLED}/domainsubcache.tar.gz | ||
| 264 | @cd ${UNGOOGLED} && env -i ${MAKE_ENV} ./utils/domain_substitution.py apply -r domain_regex.list \ | ||
| 265 | -f domain_substitution.list -c domainsubcache.tar.gz ${WRKSRC} | ||
| 266 | .endif | ||
| 267 | |||
| 268 | @cd ${WRKSRC} && env -i ${MAKE_ENV} build/linux/unbundle/replace_gn_files.py \ | ||
| 269 | --system-libraries ${GN_SYSTEM_LIBS} | ||
| 270 | @cd ${WRKSRC}/tools/gn && env -i ${MAKE_ENV} LDFLAGS=-L${LOCALBASE}/lib ${MODPY_BIN} bootstrap/bootstrap.py \ | ||
| 271 | --no-clean -s --gn-gen-args "${GN_ARGS}" | ||
| 272 | @cd ${WRKSRC} && env -i ${CONFIGURE_ENV} ${WRKSRC}/out/Release/gn \ | ||
| 273 | gen --args="${GN_ARGS}" out/${BUILDTYPE} | ||
| 274 | |||
| 275 | do-build: | ||
| 276 | @cd ${WRKSRC} && env -i ${MAKE_ENV} ninja \ | ||
| 277 | -j ${MAKE_JOBS} -C out/${BUILDTYPE} ${ALL_TARGET} | ||
| 278 | |||
| 279 | do-install: | ||
| 280 | ${INSTALL_DATA_DIR} ${PREFIX}/${DIST_TARGET_DIR} | ||
| 281 | ${INSTALL_PROGRAM} ${BUILDDIR}/${DIST_TARGET_DIR} ${PREFIX}/${DIST_TARGET_DIR} | ||
| 282 | ${SUBST_PROGRAM} ${FILESDIR}/${DIST_TARGET_DIR} ${PREFIX}/bin/${DIST_TARGET_DIR} | ||
| 283 | ${INSTALL_PROGRAM} ${BUILDDIR}/chromedriver.unstripped ${PREFIX}/bin/chromedriver | ||
| 284 | ${INSTALL_MAN} ${WRKSRC}/chrome/app/resources/manpage.1.in ${PREFIX}/man/man1/chrome.1 | ||
| 285 | @perl -pi -e "s,\@\@PACKAGE\@\@,chromium,g;s,\@\@MENUNAME\@\@,Chromium Web Browser,g" \ | ||
| 286 | ${PREFIX}/man/man1/chrome.1 | ||
| 287 | ${INSTALL_DATA} ${BUILDDIR}/*.pak ${PREFIX}/${DIST_TARGET_DIR} | ||
| 288 | |||
| 289 | ${INSTALL_DATA_DIR} ${PREFIX}/${DIST_TARGET_DIR}/locales | ||
| 290 | ${INSTALL_DATA} ${BUILDDIR}/locales/* ${PREFIX}/${DIST_TARGET_DIR}/locales | ||
| 291 | ${INSTALL_DATA} ${BUILDDIR}/*.png ${PREFIX}/${DIST_TARGET_DIR} | ||
| 292 | ${INSTALL_DATA_DIR} ${PREFIX}/${DIST_TARGET_DIR}/resources | ||
| 293 | @cp -Rp ${BUILDDIR}/resources/* ${PREFIX}/${DIST_TARGET_DIR}/resources | ||
| 294 | @chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/${DIST_TARGET_DIR}/resources | ||
| 295 | .for f in icudtl.dat snapshot_blob.bin v8_context_snapshot.bin | ||
| 296 | ${INSTALL_DATA} ${BUILDDIR}/${f} ${PREFIX}/${DIST_TARGET_DIR} | ||
| 297 | .endfor | ||
| 298 | |||
| 299 | # ANGLE, EGL, Vk | ||
| 300 | .for f in libEGL libGLESv2 | ||
| 301 | ${INSTALL_DATA} ${BUILDDIR}/${f}.so ${PREFIX}/${DIST_TARGET_DIR} | ||
| 302 | .endfor | ||
| 303 | .for f in libVkICD_mock_icd | ||
| 304 | ${INSTALL_DATA} ${BUILDDIR}/${f}.so ${PREFIX}/${DIST_TARGET_DIR} | ||
| 305 | .endfor | ||
| 306 | ${INSTALL_DATA} ${BUILDDIR}/libvulkan.so.1 \ | ||
| 307 | ${PREFIX}/${DIST_TARGET_DIR}/libvulkan.so | ||
| 308 | |||
| 309 | .if ${MACHINE_ARCH} != "aarch64" | ||
| 310 | # SwiftShader | ||
| 311 | ${INSTALL_DATA_DIR} ${PREFIX}/${DIST_TARGET_DIR}/swiftshader | ||
| 312 | ${INSTALL_DATA} ${BUILDDIR}/libvk_swiftshader.so ${PREFIX}/${DIST_TARGET_DIR} | ||
| 313 | .for f in libEGL.so libGLESv2.so | ||
| 314 | ${INSTALL_DATA} ${BUILDDIR}/swiftshader/${f} ${PREFIX}/${DIST_TARGET_DIR}/swiftshader | ||
| 315 | .endfor | ||
| 316 | .endif | ||
| 317 | |||
| 318 | .if ${FLAVOR:Mcomponent} | ||
| 319 | cp -Rp ${BUILDDIR}/*.so ${BUILDDIR}/*.so.[0-9] ${PREFIX}/${DIST_TARGET_DIR}/ | ||
| 320 | .endif | ||
| 321 | |||
| 322 | ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/chromium | ||
| 323 | .for f in pledge.main pledge.utility_audio pledge.utility_network pledge.utility_video \ | ||
| 324 | unveil.gpu unveil.main unveil.plugin unveil.renderer unveil.utility unveil.utility_audio \ | ||
| 325 | unveil.utility_network unveil.utility_video | ||
| 326 | ${INSTALL_DATA} ${FILESDIR}/${f} ${PREFIX}/share/examples/chromium | ||
| 327 | .endfor | ||
| 328 | |||
| 329 | pre-test: | ||
| 330 | .for _d in ${REGRESS_DISTFILES:C/:[0-9]$//} | ||
| 331 | @${ECHO_MSG} "Extracting ${_d}" | ||
| 332 | @case ${_d} in \ | ||
| 333 | *testdata*.tar.xz) \ | ||
| 334 | xzdec <${FULLDISTDIR}/${_d} | ${TAR} -C ${WRKDIR} -xf -;; \ | ||
| 335 | *font*.tar.gz) \ | ||
| 336 | ${GZIP_CMD} -d <${FULLDISTDIR}/${_d} | ${TAR} -C ${WRKDIST}/third_party/test_fonts -xf -;; \ | ||
| 337 | esac; | ||
| 338 | .endfor | ||
| 339 | |||
| 340 | do-test: | ||
| 341 | @cd ${WRKSRC} && env -i ${MAKE_ENV} ninja \ | ||
| 342 | -j ${MAKE_JOBS} -C out/${BUILDTYPE} ${TEST_TARGET} | ||
| 343 | |||
| 344 | .include <bsd.port.mk> | ||
