Building mate-font-viewer from source

Is there any way to build just the mate-font-viewer from source using the GitHub repo?

Since it resides in the mate-control-center, I tried to build that whole package but I’m getting a bunch of messages after running ./autogen.sh && make mentioned below:

Please add the files
  codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
  progtest.m4
from the /usr/share/aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.gnu.org/pub/gnu/config/.

and

configure: error: Package requirements (gtk+-3.0 >= 3.22.0  gmodule-2.0  glib-2.0 >= 2.50.0  gthread-2.0  gio-2.0  gio-unix-2.0  libxml-2.0  mate-desktop-2.0 >= 1.21.1) were not met:

No package 'libxml-2.0' found
No package 'mate-desktop-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables CAPPLET_CFLAGS
and CAPPLET_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
  • I installed the libxml2-dev
  • I have no idea how to go about mate-desktop-2.0, although there’s mate-desktop/mate-desktop containing libmate-desktop library that “provides API shared by several applications”; is this the one? If it is, how should I use it?

Would really appreciate it if somebody could give me a hand in this regard to a newbie like me…

Best regards,
Sakib

If you don’t get any response from here pls ask on the github project page.

At first we need to enable Source code repositories (aka deb-src) from software-properties-gtk.

Install development packages:

sudo apt-get install build-essential git

Then install all build-dependencies of mate-control-center package:

sudo apt-get build-dep mate-control-center

Then clone the repository:

cd ~/Downloads
git clone https://github.com/mate-desktop/mate-control-center.git
cd mate-control-center/
./autogen.sh

The above will fail on Ubuntu 18.04 LTS and even on 18.10 beta because of low version of mate-desktop-2.0:

configure: error: Package requirements (gtk+-3.0 >= 3.22.0  gmodule-2.0  glib-2.0 >= 2.50.0  gthread-2.0  gio-2.0  gio-unix-2.0  libxml-2.0  mate-desktop-2.0 >= 1.21.1) were not met:

Requested 'mate-desktop-2.0 >= 1.21.1' but version of mate-desktop-2.0 is 1.20.1

So we need to switch to the 1.20.3 version (should work on both 18.04 LTS and 18.10):

git checkout v1.20.3
make -j9
./font-viewer/mate-font-viewer

and so on.


Note: for deb-based distros you can also use apt-get source mate-control-center and then patch it.

3 Likes

Thanks @Norbert_X for the how-to! I will try it out as soon as I’m free and report back…:slight_smile:

Hi @Norbert_X, it worked, thanks a lot…:slight_smile:

I do have one problem though- I’ve just noticed that the application that I have built from source has replaced the original pre-installed application on the system; is there anyway to isolate the built-application from the system application?:confused:

And I keep getting the following message as I mentioned in my question, even though everything runs and builds just fine:

Please add the files
  codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4
  progtest.m4
from the /usr/share/aclocal directory to your autoconf macro directory
or directly to your aclocal.m4 file.
You will also need config.guess and config.sub, which you can get from
ftp://ftp.gnu.org/pub/gnu/config/.
1 Like

I do no want to follow my instruction again :slight_smile: But we can get things compiled with it. I do not remember about warnings I got (or not).

If you do not want to replace system binary - then you can skip sudo make install.
Also you can always restore system binary with

sudo apt-get install --reinstall mate-control-center

You can use self-compiled binary from its path by ./font-viewer/mate-font-viewer.

Reinstalling might not work, as the new package goes by default into /usr/local, which supersedes /usr.

You will need to run sudo make uninstall on your m-c-c src folder.

2 Likes