Let’s contribute Peru with GNOME – session one

This time we just gather 4 people who wants to contribute with GNOME. Two of the attendances were from PUCP who use Unity and the others two were from UNI, who use GNOME with Fedora 20. All of them were programmers; so everyone were interested in developing for GNOME and not for documentation. According to the plan  Jose Quiñones explained the GNOME project, the GNOME interfaz, the GNOME community, GNOME applications and ways to contribute by IRC.

11013318_459248050898022_139216036590430065_n

After that Cesar Fabian started the code contribution part, because all of them were interested in GNOME developer technologies. We started with glib, based on the GLIB Website. He explained us that Glib is a GNOME library written in C. We did a couple of examples: Hello Word and the following code using glist. Glists are linked lists that use the type void *. It was also explained values and basic types like gboleean where ONE represents TRUE and the rest of values are FALSE .

#include<glib.h> 
int 
main(int arg, char **argv)
{ 
  GList *list = NULL, *l; 
  list = g_list_append(list, "mango"); 
  list = g_list_append(list, "papaya"); 
  list = g_list_append(list, "watermelon"); 
  list = g_list_append(list, "almond"); 
  list = g_list_append(list, "apple"); 
  for(l = list; l != NULL; l = l->next) 
   g_print("%s\n", (char *)l->data); 
   g_list_free(list); return 0; 
}

* What took us so long was the cloning part and the packages that were left in each cases. So, the first step is going to the page: https://git.gnome.org/browse/glib and clone:

glib After that, get inside the new glib file created and do autogen:

[jinca@localhost ~]$ cd glib
 [jinca@localhost glib]$ ./autogen.sh

This was the first error message I got: glib.mk:28: If ‘LT_INIT’ is in ‘configure.ac’, make sure glib.mk:28: its definition is in aclocal’s search path. tests/Makefile.am:1: ‘glib.mk’ included from here autoreconf: automake failed with exit status: 1

To solve this, create this path  /home/jinca/opt and do the export:

$PKG_CONFIG_PATH=/home/jinca/opt/lib/pkgconfig/

 * If the system asked to install packages like libffi or gtk , just install them:

sudo yum install libffi-dev
sudo yum install gtk-doc-tools
sudo yum install libglib2.0-dev

Then, inside glib,  apply the configure and make commands:

cd glib
./configure -- prefix=$HOME/opt/
make
make install

So, after coding the examples Cesar gave us, compile and run the programs:

gcc main.c `pkg-config --cflags --libs glib-2.0` -o main
./main

After that, we reviewed some string functions like strdup that duplicated strings, but we do not have time for more. We hope next session will be more productive and we are aiming to do GTK after glib and cairo.

About Julita Inca

Ingeniero de Sistemas UNAC, Magíster en Ciencias de la Computación PUCP, OPW GNOME 2011, Miembro de la GNOME Foundation desde el 2012, Embajadora Fedora Perú desde el 2012, ganadora del scholarship of the Linux Foundation 2012, experiencia como Admin Linux en GMD y Especialista IT en IBM, con certificaciones RHCE, RHCSA, AIX 6.1, AIX 7 Administrator e ITILv3. Experiencia académica en universidades como PUCP, USIL y UNI. HPC researcher, a simple mortal, like you!
This entry was posted in GNOME, τεχνολογια :: Technology. Bookmark the permalink.

2 Responses to Let’s contribute Peru with GNOME – session one

  1. alanpater says:

    Hola Julita. Interesting. Do you know of any similar meetings in Arequipa? I have been doing some minor hacking on gexiv2 (and it’s base, exiv2). I would like to address the long list of open bugs in Shotwell, but don’t have a lot of programming experience. I’m hoping to find some local hackers to help out.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s