Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 46940 Details for
Bug 75674
gtkskan compile failure
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
replace gnome with gconf, and upgrade gtk (configure)
gtkskan-gconf-gtk2.patch (text/plain), 16.18 KB, created by
Stian Skjelstad
on 2004-12-26 22:03:02 UTC
(
hide
)
Description:
replace gnome with gconf, and upgrade gtk (configure)
Filename:
MIME Type:
Creator:
Stian Skjelstad
Created:
2004-12-26 22:03:02 UTC
Size:
16.18 KB
patch
obsolete
>Only in gtkskan-0.2-new/: Makefile >Only in gtkskan-0.2-new/: aclocal.m4 >Only in gtkskan-0.2-new/: config.cache >Only in gtkskan-0.2-new/: config.log >Only in gtkskan-0.2-new/: config.status >diff -ur gtkskan-0.2-orig/configure gtkskan-0.2-new/configure >--- gtkskan-0.2-orig/configure 2004-12-27 06:15:41.316147688 +0100 >+++ gtkskan-0.2-new/configure 2004-12-27 07:01:08.174602192 +0100 >@@ -1355,19 +1355,23 @@ > done > > >-# Extract the first word of "gtk-config", so it can be a program name with args. >-set dummy gtk-config; ac_word=$2 >+ >+ succeeded=no >+ >+ if test -z "$PKG_CONFIG"; then >+ # Extract the first word of "pkg-config", so it can be a program name with args. >+set dummy pkg-config; ac_word=$2 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >-echo "configure:1362: checking for $ac_word" >&5 >-if eval "test \"`echo '$''{'ac_cv_path_gtkpath'+set}'`\" = set"; then >+echo "configure:1366: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then > echo $ac_n "(cached) $ac_c" 1>&6 > else >- case "$gtkpath" in >+ case "$PKG_CONFIG" in > /*) >- ac_cv_path_gtkpath="$gtkpath" # Let the user override the test with a path. >+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. > ;; > ?:/*) >- ac_cv_path_gtkpath="$gtkpath" # Let the user override the test with a dos path. >+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. > ;; > *) > IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >@@ -1375,40 +1379,87 @@ > for ac_dir in $ac_dummy; do > test -z "$ac_dir" && ac_dir=. > if test -f $ac_dir/$ac_word; then >- ac_cv_path_gtkpath="$ac_dir/$ac_word" >+ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" > break > fi > done > IFS="$ac_save_ifs" >+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" > ;; > esac > fi >-gtkpath="$ac_cv_path_gtkpath" >-if test -n "$gtkpath"; then >- echo "$ac_t""$gtkpath" 1>&6 >+PKG_CONFIG="$ac_cv_path_PKG_CONFIG" >+if test -n "$PKG_CONFIG"; then >+ echo "$ac_t""$PKG_CONFIG" 1>&6 > else > echo "$ac_t""no" 1>&6 > fi > >-echo $ac_n "checking for GTK compile flags""... $ac_c" 1>&6 >-echo "configure:1395: checking for GTK compile flags" >&5 >-GTK_CFLAGS=`$gtkpath --cflags 2>/dev/null` >-GTK_LDFLAGS=`$gtkpath --libs gthread 2>/dev/null` >-echo "$ac_t""ok" 1>&6 >+ fi > >-# Extract the first word of "gnome-config", so it can be a program name with args. >-set dummy gnome-config; ac_word=$2 >+ if test "$PKG_CONFIG" = "no" ; then >+ echo "*** The pkg-config script could not be found. Make sure it is" >+ echo "*** in your path, or set the PKG_CONFIG environment variable" >+ echo "*** to the full path to pkg-config." >+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >+ else >+ PKG_CONFIG_MIN_VERSION=0.9.0 >+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then >+ echo $ac_n "checking for gtk+-2.0 >= 2.4.0 ""... $ac_c" 1>&6 >+echo "configure:1410: checking for gtk+-2.0 >= 2.4.0 " >&5 >+ >+ if $PKG_CONFIG --exists "gtk+-2.0 >= 2.4.0 " ; then >+ echo "$ac_t""yes" 1>&6 >+ succeeded=yes >+ >+ echo $ac_n "checking GTK_CFLAGS""... $ac_c" 1>&6 >+echo "configure:1417: checking GTK_CFLAGS" >&5 >+ GTK_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.4.0 "` >+ echo "$ac_t""$GTK_CFLAGS" 1>&6 >+ >+ echo $ac_n "checking GTK_LIBS""... $ac_c" 1>&6 >+echo "configure:1422: checking GTK_LIBS" >&5 >+ GTK_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.4.0 "` >+ echo "$ac_t""$GTK_LIBS" 1>&6 >+ else >+ GTK_CFLAGS="" >+ GTK_LIBS="" >+ ## If we have a custom action on failure, don't print errors, but >+ ## do set a variable so people can do so. >+ GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.4.0 "` >+ echo $GTK_PKG_ERRORS >+ fi >+ >+ >+ >+ else >+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." >+ echo "*** See http://www.freedesktop.org/software/pkgconfig" >+ fi >+ fi >+ >+ if test $succeeded = yes; then >+ : >+ else >+ { echo "configure: error: Library requirements (gtk+-2.0 >= 2.4.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } >+ fi >+ >+ succeeded=no >+ >+ if test -z "$PKG_CONFIG"; then >+ # Extract the first word of "pkg-config", so it can be a program name with args. >+set dummy pkg-config; ac_word=$2 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >-echo "configure:1403: checking for $ac_word" >&5 >-if eval "test \"`echo '$''{'ac_cv_path_gnomepath'+set}'`\" = set"; then >+echo "configure:1454: checking for $ac_word" >&5 >+if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then > echo $ac_n "(cached) $ac_c" 1>&6 > else >- case "$gnomepath" in >+ case "$PKG_CONFIG" in > /*) >- ac_cv_path_gnomepath="$gnomepath" # Let the user override the test with a path. >+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. > ;; > ?:/*) >- ac_cv_path_gnomepath="$gnomepath" # Let the user override the test with a dos path. >+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path. > ;; > *) > IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" >@@ -1416,31 +1467,75 @@ > for ac_dir in $ac_dummy; do > test -z "$ac_dir" && ac_dir=. > if test -f $ac_dir/$ac_word; then >- ac_cv_path_gnomepath="$ac_dir/$ac_word" >+ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word" > break > fi > done > IFS="$ac_save_ifs" >+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" > ;; > esac > fi >-gnomepath="$ac_cv_path_gnomepath" >-if test -n "$gnomepath"; then >- echo "$ac_t""$gnomepath" 1>&6 >+PKG_CONFIG="$ac_cv_path_PKG_CONFIG" >+if test -n "$PKG_CONFIG"; then >+ echo "$ac_t""$PKG_CONFIG" 1>&6 > else > echo "$ac_t""no" 1>&6 > fi > >-echo $ac_n "checking for Gnome compile flags""... $ac_c" 1>&6 >-echo "configure:1436: checking for Gnome compile flags" >&5 >-GNOME_CFLAGS=`$gnomepath gnome --cflags 2>/dev/null` >-GNOME_LDFLAGS=`$gnomepath gnome --libs 2>/dev/null` >-echo "$ac_t""ok" 1>&6 >+ fi >+ >+ if test "$PKG_CONFIG" = "no" ; then >+ echo "*** The pkg-config script could not be found. Make sure it is" >+ echo "*** in your path, or set the PKG_CONFIG environment variable" >+ echo "*** to the full path to pkg-config." >+ echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >+ else >+ PKG_CONFIG_MIN_VERSION=0.9.0 >+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then >+ echo $ac_n "checking for gconf-2.0 >= 0.15.0 ""... $ac_c" 1>&6 >+echo "configure:1498: checking for gconf-2.0 >= 0.15.0 " >&5 >+ >+ if $PKG_CONFIG --exists "gconf-2.0 >= 0.15.0 " ; then >+ echo "$ac_t""yes" 1>&6 >+ succeeded=yes >+ >+ echo $ac_n "checking GCONF_CFLAGS""... $ac_c" 1>&6 >+echo "configure:1505: checking GCONF_CFLAGS" >&5 >+ GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 0.15.0 "` >+ echo "$ac_t""$GCONF_CFLAGS" 1>&6 >+ >+ echo $ac_n "checking GCONF_LIBS""... $ac_c" 1>&6 >+echo "configure:1510: checking GCONF_LIBS" >&5 >+ GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 0.15.0 "` >+ echo "$ac_t""$GCONF_LIBS" 1>&6 >+ else >+ GCONF_CFLAGS="" >+ GCONF_LIBS="" >+ ## If we have a custom action on failure, don't print errors, but >+ ## do set a variable so people can do so. >+ GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 0.15.0 "` >+ echo $GCONF_PKG_ERRORS >+ fi >+ >+ >+ >+ else >+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." >+ echo "*** See http://www.freedesktop.org/software/pkgconfig" >+ fi >+ fi > >+ if test $succeeded = yes; then >+ : >+ else >+ { echo "configure: error: Library requirements (gconf-2.0 >= 0.15.0 ) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." 1>&2; exit 1; } >+ fi >+ > # Extract the first word of "esd-config", so it can be a program name with args. > set dummy esd-config; ac_word=$2 > echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 >-echo "configure:1444: checking for $ac_word" >&5 >+echo "configure:1539: checking for $ac_word" >&5 > if eval "test \"`echo '$''{'ac_cv_path_esdpath'+set}'`\" = set"; then > echo $ac_n "(cached) $ac_c" 1>&6 > else >@@ -1473,13 +1568,13 @@ > fi > > echo $ac_n "checking for ESD compile flags""... $ac_c" 1>&6 >-echo "configure:1477: checking for ESD compile flags" >&5 >+echo "configure:1572: checking for ESD compile flags" >&5 > ESD_CFLAGS=`$esdpath --cflags 2>/dev/null` > ESD_LDFLAGS=`$esdpath --libs 2>/dev/null` > echo "$ac_t""ok" 1>&6 > >-LIBS="$LIBS $ESD_LDFLAGS $GTK_LDFLAGS $GNOME_LDFLAGS" >-CFLAGS="$CFLAGS $ESD_CFLAGS $GTK_CFLAGS $GNOME_CFLAGS" >+LIBS="$LIBS $ESD_LDFLAGS $GTK_LIBS $GCONF_LIBS" >+CFLAGS="$CFLAGS $ESD_CFLAGS $GTK_CFLAGS $GCONF_CFLAGS" > > trap '' 1 2 15 > cat > confcache <<\EOF >@@ -1636,8 +1731,11 @@ > s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g > s%@INSTALL_DATA@%$INSTALL_DATA%g > s%@CPP@%$CPP%g >-s%@gtkpath@%$gtkpath%g >-s%@gnomepath@%$gnomepath%g >+s%@PKG_CONFIG@%$PKG_CONFIG%g >+s%@GTK_CFLAGS@%$GTK_CFLAGS%g >+s%@GTK_LIBS@%$GTK_LIBS%g >+s%@GCONF_CFLAGS@%$GCONF_CFLAGS%g >+s%@GCONF_LIBS@%$GCONF_LIBS%g > s%@esdpath@%$esdpath%g > > CEOF >diff -ur gtkskan-0.2-orig/configure.in gtkskan-0.2-new/configure.in >--- gtkskan-0.2-orig/configure.in 2004-12-27 06:15:41.316147688 +0100 >+++ gtkskan-0.2-new/configure.in 2004-12-27 07:01:06.524852992 +0100 >@@ -24,17 +24,8 @@ > AC_PROG_GCC_TRADITIONAL > AC_CHECK_FUNCS(select socket strdup strerror) > >-AC_PATH_PROG(gtkpath, gtk-config) >-AC_MSG_CHECKING(for GTK compile flags) >-GTK_CFLAGS=`$gtkpath --cflags 2>/dev/null` >-GTK_LDFLAGS=`$gtkpath --libs gthread 2>/dev/null` >-AC_MSG_RESULT(ok) >- >-AC_PATH_PROG(gnomepath, gnome-config) >-AC_MSG_CHECKING(for Gnome compile flags) >-GNOME_CFLAGS=`$gnomepath gnome --cflags 2>/dev/null` >-GNOME_LDFLAGS=`$gnomepath gnome --libs 2>/dev/null` >-AC_MSG_RESULT(ok) >+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4.0 ) dnl what version ? >+PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 0.15.0 ) dnl what version ? > > AC_PATH_PROG(esdpath, esd-config) > AC_MSG_CHECKING(for ESD compile flags) >@@ -42,8 +33,8 @@ > ESD_LDFLAGS=`$esdpath --libs 2>/dev/null` > AC_MSG_RESULT(ok) > >-LIBS="$LIBS $ESD_LDFLAGS $GTK_LDFLAGS $GNOME_LDFLAGS" >-CFLAGS="$CFLAGS $ESD_CFLAGS $GTK_CFLAGS $GNOME_CFLAGS" >+LIBS="$LIBS $ESD_LDFLAGS $GTK_LIBS $GCONF_LIBS" >+CFLAGS="$CFLAGS $ESD_CFLAGS $GTK_CFLAGS $GCONF_CFLAGS" > > AC_OUTPUT([ > Makefile >Only in gtkskan-0.2-new/data: Makefile >Only in gtkskan-0.2-new/src: Makefile >diff -ur gtkskan-0.2-orig/src/Makefile.in gtkskan-0.2-new/src/Makefile.in >--- gtkskan-0.2-orig/src/Makefile.in 2004-12-27 06:15:41.317147536 +0100 >+++ gtkskan-0.2-new/src/Makefile.in 2004-12-27 06:42:30.992439696 +0100 >@@ -19,7 +19,7 @@ > CPPFLAGS = @CPPFLAGS@ > CFLAGS = $(CPPFLAGS) @CFLAGS@ $(DEFINES) > LIBS = @LIBS@ >-LDFLAGS = @LDFLAGS@ $(GNOME_LDFLAGS) $(LIBS) >+LDFLAGS = @LDFLAGS@ $(GCONF2_LDFLAGS) $(LIBS) > INSTALL = @INSTALL@ > WIRELESS_TOOLS_DIR = wireless_tools.22 > LIBNMEA = nmea/libnmea.a >diff -ur gtkskan-0.2-orig/src/nmea/Makefile gtkskan-0.2-new/src/nmea/Makefile >--- gtkskan-0.2-orig/src/nmea/Makefile 2004-12-27 06:15:41.318147384 +0100 >+++ gtkskan-0.2-new/src/nmea/Makefile 2004-12-27 07:01:13.286825016 +0100 >@@ -16,9 +16,9 @@ > > CC = gcc > CPPFLAGS = >-CFLAGS = $(CPPFLAGS) -g -O2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include $(DEFINES) >+CFLAGS = $(CPPFLAGS) -g -O2 -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -DORBIT2=1 -pthread -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include $(DEFINES) > LDFLAGS = >-INSTALL = /usr/bin/install -c >+INSTALL = /bin/install -c > > # these need static libs: -lXext -lX11 > >diff -ur gtkskan-0.2-orig/src/skan.c gtkskan-0.2-new/src/skan.c >--- gtkskan-0.2-orig/src/skan.c 2004-12-27 06:15:41.317147536 +0100 >+++ gtkskan-0.2-new/src/skan.c 2004-12-27 06:54:41.271420416 +0100 >@@ -176,11 +176,11 @@ > gtk_widget_show (menubar); > > // K,: now for the toolbar >- toolbar = gtk_toolbar_new ( GTK_ORIENTATION_HORIZONTAL, >- GTK_TOOLBAR_BOTH ); >- gtk_container_set_border_width ( GTK_CONTAINER ( toolbar ) , 1 ); >- gtk_toolbar_set_space_size ( GTK_TOOLBAR ( toolbar ), 0 ); >- >+ toolbar = gtk_toolbar_new ( ); >+ gtk_toolbar_set_orientation ( GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL ); >+ gtk_toolbar_set_style ( GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH ); >+ gtk_container_set_border_width ( GTK_CONTAINER(toolbar), 1 ); >+ > // And now for the go pixmap icon dealy > style = gtk_widget_get_style( window ); > >@@ -254,9 +254,6 @@ > "Exit", "Exit gtkskan", "Private", iconw, > GTK_SIGNAL_FUNC (destroy), NULL ); > >- >- gtk_toolbar_set_space_size (GTK_TOOLBAR(toolbar), 6); >- > // Add the toolbar to the vbox (box1) and a seperator > gtk_box_pack_start(GTK_BOX (box1), toolbar, FALSE, FALSE, 0); > gtk_widget_show(toolbar); >diff -ur gtkskan-0.2-orig/src/skan_config.c gtkskan-0.2-new/src/skan_config.c >--- gtkskan-0.2-orig/src/skan_config.c 2004-12-27 06:15:41.318147384 +0100 >+++ gtkskan-0.2-new/src/skan_config.c 2004-12-27 06:53:18.373022888 +0100 >@@ -1,36 +1,61 @@ > /* gtkskan configuration gui and meaty bits */ > > #include <gtk/gtk.h> >-#include <libgnome/libgnome.h> >+#include <gconf/gconf.h> >+#include <gconf/gconf-client.h> >+#include <stdio.h> > #include "skan_config.h" > > extern gtkskan_config_t skan_conf; > extern GtkWidget *main_window; > > void gtkskan_load_config(gtkskan_config_t *skan_config) { >- gboolean def; >- GString *foo = g_string_new(NULL); >+ GConfClient *gconf=NULL; >+ GConfValue *value; > >- skan_config->interface = >- gnome_config_get_string_with_default("/gtkskan/config/interface=eth0", >- &def); >- skan_config->sound = >- gnome_config_get_bool_with_default("/gtkskan/config/sound=TRUE", &def); >- >- g_string_assign(foo, "/gtkskan/config/snd_path="); >- g_string_append(foo, DATA_DIR); >- g_string_append(foo, "/netfound.wav"); >- skan_config->snd_path = gnome_config_get_string_with_default( >- foo->str, &def); >- g_string_free(foo, TRUE); >- >+ /* default values */ >+ skan_config->interface=g_strdup("eth0"); >+ skan_config->sound=TRUE; >+ skan_config->snd_path=g_strdup(DATA_DIR "/netfound.wav" ); >+ >+ if (!(gconf=gconf_client_get_default ())) >+ { /* we failed to contact gconfd */ >+ return; >+ } >+ >+ if ((value=gconf_client_get(gconf, "/apps/gtkskan/interface", NULL))) >+ { >+ g_free(skan_config->interface); >+ skan_config->interface=g_strdup(gconf_value_get_string(value)); >+ gconf_value_free(value); >+ } >+ >+ if ((value=gconf_client_get(gconf, "/apps/gtkskan/sound", NULL))) >+ { >+ skan_config->sound = gconf_value_get_bool(value); >+ gconf_value_free(value); >+ } >+ >+ if ((value=gconf_client_get(gconf, "/apps/gtkskan/snd_path", NULL))) >+ { >+ g_free(skan_config->snd_path); >+ skan_config->snd_path=g_strdup(gconf_value_get_string(value)); >+ gconf_value_free(value); >+ } >+ g_object_unref(gconf); > } > > void gtkskan_save_config(gtkskan_config_t *skan_config) { >- gnome_config_set_string("/gtkskan/config/interface", skan_config->interface); >- gnome_config_set_bool("/gtkskan/config/sound", skan_config->sound); >- gnome_config_set_string("/gtkskan/config/snd_path", skan_config->snd_path); >- gnome_config_sync(); >+ GConfClient *gconf=NULL; >+ >+ if (!(gconf=gconf_client_get_default ())) >+ { /* we failed to contact gconfd */ >+ return; >+ } >+ gconf_client_set_string(gconf, "/apps/gtkskan/interface", skan_config->interface, NULL); >+ gconf_client_set_bool(gconf, "/apps/gtkskan/sound", skan_config->sound, NULL); >+ gconf_client_set_string(gconf, "/apps/gtkskan/snd_path", skan_config->snd_path, NULL); >+ g_object_unref(gconf); > } > > GList * gtkskan_get_interface_list(void) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 75674
: 46940