From 7b5821251f38cb19e9ddbae69a5a6ac2e2a81be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 2 Dec 2023 01:42:17 +0100 Subject: [PATCH] tools: Remove outdated jhbuild setup script As useful as the custom jhbuild setup was at the time, it has been superseded by jhbuild proper (which gained the ability to install system dependencies since) or alternatives like containers. Given that the script hasn't been meaningfully updated for almost 10 years, its list of dependencies is hopelessly outdated, and it's therefore more likely to confuse newcomers than being of actual help. As much as I have fond memories of the script when starting out, it's finally time to retire. Part-of: --- tools/build/gnome-shell-build-setup.sh | 348 ------------------------- tools/build/jhbuildrc-custom-example | 18 -- tools/build/jhbuildrc-gnome-shell | 54 ---- 3 files changed, 420 deletions(-) delete mode 100755 tools/build/gnome-shell-build-setup.sh delete mode 100644 tools/build/jhbuildrc-custom-example delete mode 100644 tools/build/jhbuildrc-gnome-shell diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh deleted file mode 100755 index 59637e4a5..000000000 --- a/tools/build/gnome-shell-build-setup.sh +++ /dev/null @@ -1,348 +0,0 @@ -#!/bin/sh -# -# Script that sets up jhbuild to build gnome-shell. Run this to -# checkout jhbuild and the required configuration. -# -# Copyright (C) 2008, Red Hat, Inc. -# -# Some ideas and code taken from gtk-osx-build -# -# Copyright (C) 2006, 2007, 2008 Imendio AB -# - -release_file= - -if which lsb_release > /dev/null 2>&1; then - system=`lsb_release -is` - version=`lsb_release -rs` -elif [ -f /etc/fedora-release ] ; then - system=Fedora - release_file=/etc/fedora-release -elif [ -f /etc/SuSE-release ] ; then - system=SUSE - release_file=/etc/SuSE-release -elif [ -f /etc/mandriva-release ]; then - system=MandrivaLinux - release_file=/etc/mandriva-release -fi - -if [ x$release_file != x ] ; then - version=`sed 's/[^0-9\.]*\([0-9\.]\+\).*/\1/' < $release_file` -fi - -# This is the configuration of packages that we'll need to successfully jhbuild. -# Each line is of the form: -# -# name_of_depenency: :package [:package...] -# -# The dependency name is purely informative and isn't otherwise used. distro_chars are: -# -# f: Fedora -# d: Debian/Ubuntu -# s: SuSE -# m: Mandriva -# -# Rather than have some complicated system here, when we have packages that depend -# on distribution version, we just tweak the package list in the code below. -# Where known, the module that requires a library is commented. - -all_packages() { -cat <:package - IFS=: - set $word - IFS=' ' - case $1 in - *$distribution_char*) echo $2 - esac - done - done -} - -# We try to make it clear what we're doing via sudo so if a user gets prompted -# for their password, they have some idea why. -run_via_sudo() { - echo "Running: sudo $@" - if sudo "$@" ; then : ; else - echo 1>&2 "Command failed." - echo 1>&2 "Exiting gnome-shell-build-setup.sh. You can run it again safely." - exit 1 - fi -} - -if test "x$system" = xUbuntu -o "x$system" = xDebian -o "x$system" = xLinuxMint ; then - reqd=`packages_for_distribution d` - - if apt-cache show libxcb-util0-dev > /dev/null 2> /dev/null; then - reqd="$reqd libxcb-util0-dev" - else - reqd="$reqd libxcb-event1-dev libxcb-aux0-dev" - fi - - if apt-cache show autopoint > /dev/null 2> /dev/null; then - reqd="$reqd autopoint" - fi - - if [ ! -x /usr/bin/dpkg-checkbuilddeps -o ! -x /usr/bin/apt-file ]; then - echo "Installing base dependencies" - run_via_sudo apt-get install dpkg-dev apt-file - fi - - echo "Updating apt-file cache" - run_via_sudo apt-file update - - # libcurl comes in both gnutls and openssl flavors. If the openssl - # flavor of the runtime is installed, install the matching -dev - # package, but default to the gnutls version. (the libcurl3 vs. libcurl4 - # mismatch is intentional and is how things are packaged.) - - if ! dpkg-checkbuilddeps -d libcurl-dev /dev/null 2> /dev/null; then - if dpkg -s libcurl3 /dev/null 2> /dev/null; then - missing="libcurl4-openssl-dev $missing" - elif dpkg -s libcurl3-nss /dev/null 2> /dev/null; then - missing="libcurl4-nss-dev $missing" - else - missing="libcurl4-gnutls-dev $missing" - fi - fi - - for pkg in $reqd ; do - if ! dpkg-checkbuilddeps -d $pkg /dev/null 2> /dev/null; then - missing="$pkg $missing" - fi - done - if test ! "x$missing" = x; then - echo "Installing packages" - run_via_sudo apt-get install $missing - fi -fi - -if test "x$system" = xFedora ; then - reqd=`packages_for_distribution f` - - if expr $version = 14 > /dev/null ; then - reqd="$reqd gettext-autopoint" - elif expr $version \>= 15 > /dev/null ; then - reqd="$reqd gettext-devel" - fi - - # For evolution-data-server: - # /usr/include/db.h moved packages in Fedora 18 - if expr $version \>= 18 > /dev/null ; then - reqd="$reqd libdb-devel" - else - reqd="$reqd db4-devel" - fi - - echo -n "Computing packages to install ... " - for pkg in $reqd ; do - if ! rpm -q --whatprovides $pkg > /dev/null 2>&1; then - missing="$pkg $missing" - fi - done - echo "done" - - if test ! "x$missing" = x; then - echo -n "Installing packages ... " - missing_str= - for pkg in $missing ; do - missing_str="$missing_str${missing_str:+,}\"$pkg\"" - done - gdbus call -e -d org.freedesktop.PackageKit -o /org/freedesktop/PackageKit -m org.freedesktop.PackageKit.Modify.InstallPackageNames 0 "[$missing_str]" "hide-finished,show-warnings" - echo "done" - fi -fi - -if test "x$system" = xSUSE -o "x$system" = "xSUSE LINUX" ; then - reqd=`packages_for_distribution s` - if test ! "x$reqd" = x; then - echo "Please run 'su --command=\"zypper install $reqd\"' and try again." - echo - exit 1 - fi -fi - -if test "x$system" = xMandrivaLinux ; then - reqd=`packages_for_distribution m` - if test ! "x$reqd" = x; then - gurpmi --auto $reqd - fi -fi - -SOURCE=$HOME/Source -BASEURL=http://git.gnome.org/browse/gnome-shell/plain/tools/build - -if [ -d $SOURCE ] ; then : ; else - mkdir $SOURCE - echo "Created $SOURCE" -fi - -checkout_git() { - module=$1 - source=$2 - - if [ -d $SOURCE/$1 ] ; then - if [ -d $SOURCE/$1/.git ] ; then - echo -n "Updating $1 ... " - ( cd $SOURCE/$1 && git pull --rebase > /dev/null ) || exit 1 - echo "done" - else - echo "$SOURCE/$1 is not a git repository" - echo "You should remove it and rerun this script" - exit 1 - fi - else - echo -n "Checking out $1 into $SOURCE/$1 ... " - cd $SOURCE - git clone $2 > /dev/null || exit 1 - echo "done" - fi -} - -checkout_git jhbuild git://git.gnome.org/jhbuild - -echo -n "Installing jhbuild ... " -(cd $SOURCE/jhbuild && - ./autogen.sh --simple-install && - make -f Makefile.plain DISABLE_GETTEXT=1 bindir=$HOME/bin install) >/dev/null -echo "done" - -if [ -e $HOME/.jhbuildrc ] ; then - if grep JHBUILDRC_GNOME_SHELL $HOME/.jhbuildrc > /dev/null ; then : ; else - mv $HOME/.jhbuildrc $HOME/.jhbuildrc.bak - echo "Saved ~/.jhbuildrc as ~/.jhbuildrc.bak" - fi -fi - -echo -n "Writing ~/.jhbuildrc ... " -curl -L -s -o $HOME/.jhbuildrc $BASEURL/jhbuildrc-gnome-shell -echo "done" - -if [ ! -f $HOME/.jhbuildrc-custom ]; then - echo -n "Writing example ~/.jhbuildrc-custom ... " - curl -L -s -o $HOME/.jhbuildrc-custom $BASEURL/jhbuildrc-custom-example - echo "done" -fi - -if [ -d $HOME/gnome-shell -a \! -d $HOME/gnome ] ; then - cat <