From 606bc59d0f8f67815c6a717843835477d44db6b3 Mon Sep 17 00:00:00 2001 From: davidovski Date: Sun, 1 May 2022 21:21:05 +0000 Subject: added ungoogled chromium --- repo/apps/arandr.xibuild | 15 +++ repo/apps/chromium.xibuild | 287 +++++++++++++++++++++++++++++++++++++++++++++ repo/apps/mpv.xibuild | 33 ++++++ repo/apps/pcmanfm.xibuild | 33 ++++++ repo/apps/polybar.xibuild | 44 +++++++ 5 files changed, 412 insertions(+) create mode 100644 repo/apps/arandr.xibuild create mode 100644 repo/apps/chromium.xibuild create mode 100644 repo/apps/mpv.xibuild create mode 100644 repo/apps/pcmanfm.xibuild create mode 100644 repo/apps/polybar.xibuild (limited to 'repo/apps') diff --git a/repo/apps/arandr.xibuild b/repo/apps/arandr.xibuild new file mode 100644 index 0000000..7b926ff --- /dev/null +++ b/repo/apps/arandr.xibuild @@ -0,0 +1,15 @@ +#!/bin/sh + +NAME="arandr" +DESC="ARandR provides a simple visual front end for XRandR" + +MAKEDEPS="python python-setuptools " +DEPS="xrandr cairo python-gobject python " + +PKG_VER=0.1.10 +SOURCE="http://christian.amsuess.com/tools/arandr/files/arandr-$PKG_VER.tar.gz" + + +package () { + python3 setup.py install --prefix=/usr --root=$PKG_DEST +} diff --git a/repo/apps/chromium.xibuild b/repo/apps/chromium.xibuild new file mode 100644 index 0000000..2edfbd3 --- /dev/null +++ b/repo/apps/chromium.xibuild @@ -0,0 +1,287 @@ +#!/bin/sh + +NAME="chromium" +DESC="Chromium webbrowser (ungoogled)" + +MAKEDEPS="meson ninja hwids compiler-rt lld pciutils" +DEPS="alsa-lib at-spi2-atk at-spi2-core atk cairo dbus eudev expat ffmpeg4 flac font-opensans fontconfig freetype2 glib gtk3 harfbuzz lcms2 libdrm libevent libjpeg-turbo libpng pulseaudio libwebp libx11 libxcb libxcomposite libxdamage libxext libxfixes libxkbcommon libxml2 libxrandr libxslt mesa musl nspr nss opus pango re2 snappy wayland xdg-utils nodejs" + +PKG_VER=100.0.4896.127 + +SOURCE="https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$PKG_VER.tar.xz" + +fonts_package=cd96fc55dc243f6c6f4cb63ad117cad6cd48dceb +_launcher_ver=8 +ADDITIONAL=" +https://github.com/Eloston/ungoogled-chromium/archive/$PKG_VER-1.tar.gz +https://chromium-fonts.storage.googleapis.com/$fonts_package + +chromium-VirtualCursor-standard-layout.patch +chromium-revert-drop-of-system-java.patch +chromium-use-alpine-target.patch +chromium.conf +chromium-launcher.sh +chromium.desktop +credentials-header.patch +default-pthread-stacksize.patch +elf-arm.patch +fix-narrowing-cast.patch +fix-unittests-sandbox.patch +gcc-arm.patch +gdbinit.patch +google-api.keys +media-base.patch +memory-tagging-arm64.patch +musl-crashpad.patch +musl-fixes.patch +musl-hacks.patch +musl-libc++.patch +musl-sandbox.patch +musl-stat.patch +musl-tid-caching.patch +musl-v8-monotonic-pthread-cont_timedwait.patch +nasm.patch +no-execinfo.patch +no-getcontext.patch +no-mallinfo.patch +quiche-arena-size.patch +resolver.patch +revert-use-ffile-compilation-dir.patch +scoped-file.patch +system-opus.patch +use-deprecated-ffmpeg-api.patch +unbundle-ffmpeg-av_stream_get_first_dts.patch +use-oauth2-client-switches-as-default.patch +wayland-egl.patch +webcodecs-stop-using-AudioOpusEncoder.patch +" + +prepare () { + apply_patches + + # Congratulations, you have found a bug! The bug is in the application that uses this internal glibc header + files="third_party/libsync/src/include/sync/sync.h + third_party/crashpad/crashpad/compat/linux/sys/ptrace.h + base/allocator/allocator_shim_internals.h" + for f in $files; do + sed -i "s/__BEGIN_DECLS/#ifdef __cplusplus\nextern \"C\" {\n#endif/g" $f + sed -i "s/__END_DECLS/#ifdef __cplusplus\n}\n#endif/g" $f + sed -i "s,#include ,," $f + done + + # prevent annoying errors when regenerating gni + sed -i 's,^update_readme$,#update_readme,' \ + third_party/libvpx/generate_gni.sh + + # allow system dependencies in "official builds" + sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ + tools/generate_shim_headers/generate_shim_headers.py + + + tar xf chromium-launcher-$_launcher_ver.tar.gz + tar xf $fonts_package + tar xf $PKG_VER-1.tar.gz + ungoogled_repo="ungoogled-chromium-$PKG_VER-1" + utils="${ungoogled_repo}/utils" + + python "$utils/prune_binaries.py" ./ "$ungoogled_repo/pruning.list" + python "$utils/patches.py" apply ./ "$ungoogled_repo/patches" + python "$utils/domain_substitution.py" apply -r "$ungoogled_repo/domain_regex.list" \ + -f "$ungoogled_repo/domain_substitution.list" -c domainsubcache.tar.gz ./ + + mv test_fonts ./third_party/test_fonts + + sed 's|//third_party/usb_ids/usb.ids|/usr/share/hwdata/usb.ids|g' \ + -i services/device/public/cpp/usb/BUILD.gn + + mkdir -p third_party/node/linux/node-linux-x64/bin + ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/ + + # Remove bundled libraries for which we will use the system copies; this + # *should* do what the remove_bundled_libraries.py script does, with the + # added benefit of not having to list all the remaining libraries + + local use_system=" + ffmpeg + flac + fontconfig + freetype + harfbuzz-ng + libdrm + libevent + libjpeg + libwebp + libxml + libxslt + opus + re2 + snappy + " + + local _lib + for _lib in ${use_system}; do + for f in $(find "third_party/$_lib/chromium" "third_party/$_lib/google" -type f \( -name "*.gn" -or -name "*.gni" -or -name "*.isolate" \)); do + echo "removing $f to use system $_lib" + rm $f + done + done + + python build/linux/unbundle/replace_gn_files.py \ + --system-libraries ${use_system} + python third_party/libaddressinput/chromium/tools/update-strings.py +} + +build () { + export CC=clang + export CXX=clang++ + export LD=clang++ + export AR=ar + export NM=nm + + flags=" +custom_toolchain=\"//build/toolchain/linux/unbundle:default\" +host_toolchain=\"//build/toolchain/linux/unbundle:default\" +enable_nacl=false +use_sysroot=false +clang_use_chrome_plugins=false +is_clang=true +use_lld=false +gold_path=\"/usr/bin/ld.gold\" +use_custom_libcxx=false +use_gold=false +is_debug=false +blink_symbol_level=0 +symbol_level=0 +icu_use_data_file=true +use_allocator=\"none\" +use_allocator_shim=false +enable_widevine=true +use_system_harfbuzz=false +use_system_wayland_scanner=true +use_cups=false +use_gnome_keyring=false +use_vaapi=true +enable_js_type_check=true +use_pulseaudio=true +link_pulseaudio=true +rtc_use_pipewire=true +proprietary_codecs=false +ffmpeg_branding=\"Chrome\" +fatal_linker_warnings=false +disable_fieldtrial_testing_config=true +is_official_build=true +is_cfi=false +use_thin_lto=false +use_cfi_icall=false +chrome_pgo_phase=0 + " + + # Append ungoogled chromium flags to _flags array + flags="$flags + $(cat "ungoogled-chromium-$PKG_VER-1/flags.gn") + " + + # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn) + CFLAGS="$CFLAGS -Wno-builtin-macro-redefined" + CXXFLAGS="$CXXFLAGS -Wno-builtin-macro-redefined" + CPPFLAGS="$CPPFLAGS -D__DATE__= -D__TIME__= -D__TIMESTAMP__=" + + # Do not warn about unknown warning options + CFLAGS="$CFLAGS -Wno-unknown-warning-option" + CXXFLAGS="$CXXFLAGS -Wno-unknown-warning-option" + + python3 tools/gn/bootstrap/bootstrap.py -s -v --skip-generate-buildfiles + + ./out/Release/gn gen out/Release --args="$flags" + + ninja -C out/Release mksnapshot + ninja -C out/Release v8_context_snapshot_generator + + ulimit -n 2048 + ninja -C out/Release chrome chrome_sandbox chromedriver +} + +package () { + install -Dm755 chromium-launcher.sh \ + "$PKG_DEST"/usr/lib/chromium/chromium-launcher.sh + + install -D out/Release/chrome "$PKG_DEST/usr/lib/chromium/chromium" + install -D out/Release/chromedriver "$PKG_DEST/usr/bin/chromedriver" + install -Dm4755 out/Release/chrome_sandbox "$PKG_DEST/usr/lib/chromium/chrome-sandbox" + + install -Dm644 ../chromium-drirc-disable-10bpc-color-configs.conf \ + "$PKG_DEST/usr/share/drirc.d/10-chromium.conf" + + install -Dm644 chrome/installer/linux/common/desktop.template \ + "$PKG_DEST/usr/share/applications/chromium.desktop" + install -Dm644 chrome/app/resources/manpage.1.in \ + "$PKG_DEST/usr/share/man/man1/chromium.1" + sed -i \ + -e 's/@@MENUNAME@@/Chromium/g' \ + -e 's/@@PACKAGE@@/chromium/g' \ + -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \ + "$PKG_DEST/usr/share/applications/chromium.desktop" \ + "$PKG_DEST/usr/share/man/man1/chromium.1" + + install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \ + "$PKG_DEST/usr/share/metainfo/chromium.appdata.xml" + sed -ni \ + -e 's/chromium-browser\.desktop/chromium.desktop/' \ + -e '//d' \ + -e '/

/N;/

\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \ + -e '/^ Makefile.am + aclocal + autoreconf + automake --add-missing +} + +build () { + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --with-gtk=3 + make +} + +package () { + make DESTDIR=$PKG_DEST install + sed -i 's|x-directory/normal|inode/directory|' \ + "$PKG_DEST"/usr/share/applications/pcmanfm.desktop +} diff --git a/repo/apps/polybar.xibuild b/repo/apps/polybar.xibuild new file mode 100644 index 0000000..16e07af --- /dev/null +++ b/repo/apps/polybar.xibuild @@ -0,0 +1,44 @@ +#!/bin/sh + +NAME="polybar" +DESC="fast and easy-to-use tool for creating status bars" + +MAKEDEPS="cmake " +DEPS="alsa-lib sbase cairo fontconfig freetype2 jsoncpp curl libmpdclient pulseaudio libuv musl libxcb xcb-util-cursor xcb-util-wm " + +PKG_VER=3.6.1 +SOURCE="https://github.com/polybar/polybar/archive/$PKG_VER.tar.gz" + +xppver="044e69d05db7f89339bda1ccd1efe0263b01c8f6" +i3ipcppver="86ddf7102c6903ae0cc543071e2d375403fc0727" + +ADDITIONAL="fix-version.patch +https://github.com/polybar/xpp/archive/$xppver.tar.gz +https://github.com/polybar/i3ipcpp/archive/$i3ipcppver.tar.gz +" + +prepare () { + tar -xf $xppver.tar.gz + tar -xf $i3ipcppver.tar.gz + + mkdir build + rm -rf lib/xpp + mv xpp-$xppver lib/xpp + rm -rf lib/i3ipcpp + mv i3ipcpp-$i3ipcpp lib/i3ipcpp + + apply_patches +} + +build () { + cmake -B build \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=/usr/lib \ + -DBUILD_SHARED_LIBS=True \ + -DBUILD_STATIC_LIBS=OFF + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} -- cgit v1.2.1