From 279fa0a6b031d33f6f7e35a481fcd0c4085a2d34 Mon Sep 17 00:00:00 2001 From: dmn Date: Fri, 10 Jul 2015 13:32:49 +0300 Subject: [PATCH] Fix FreeBSD build and install errors. 1) build-tools/icon-theme-installer uses non-portable sed extension (as in lp-1424410 bug - application's icons lost). 2) Use of g_return_val_if_fail() where g_return_if_fail() must be used, and vice versa. 3) gaf/Makefile.am: 'date -d' is not portable. 4) libgeda/src/scheme_object.c: one of SCM_DEFINE macros fail to expand properly. --- build-tools/icon-theme-installer | 2 +- gaf/Makefile.am | 2 +- gschem/src/gschem_options_dialog.c | 4 ++-- gschem/src/o_bus.c | 4 ++-- gschem/src/x_grid.c | 2 +- libgeda/src/scheme_object.c | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build-tools/icon-theme-installer b/build-tools/icon-theme-installer index 594dd72..cc90335 100755 --- a/build-tools/icon-theme-installer +++ b/build-tools/icon-theme-installer @@ -121,7 +121,7 @@ for icon in $@; do size=`echo $icon | sed -n 's/.*-\([0-9]*\).*/\1/p'` category=`echo $icon | cut -d, -f1` build_name=`echo $icon | cut -d, -f2` - install_name=`echo $build_name | sed 's/-[0-9]\+//g'` + install_name=`echo $build_name | sed 's/-[0-9][0-9]*//g'` install_name=`basename $install_name` if test -z $size; then diff --git a/gaf/Makefile.am b/gaf/Makefile.am index d54f5d8..c8ac7ed 100644 --- a/gaf/Makefile.am +++ b/gaf/Makefile.am @@ -44,7 +44,7 @@ snarf_cpp_opts = $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ CPP="$(CPP)" $(GUILE_SNARF) -o $@ $< $(snarf_cpp_opts) .1.in.1: - d=`LANG=C date -d $(DATE_VERSION) "+%B %-d, %Y"` ; \ + d=$(DATE_VERSION); \ v="$(DOTTED_VERSION).$(DATE_VERSION)" ; \ sed -e"s:[@]DATE@:$$d:" -e"s:[@]VERSION@:$$v:" < $< > $@ diff --git a/gschem/src/gschem_options_dialog.c b/gschem/src/gschem_options_dialog.c index ddd51a4..92b9f5d 100644 --- a/gschem/src/gschem_options_dialog.c +++ b/gschem/src/gschem_options_dialog.c @@ -216,7 +216,7 @@ create_grid_mode_widget (GschemOptionsDialog *dialog) GtkWidget *box; int index; - g_return_if_fail (dialog != NULL); + g_return_val_if_fail (dialog != NULL, 0); box = gtk_hbox_new (FALSE, FALSE); @@ -339,7 +339,7 @@ create_snap_mode_widget (GschemOptionsDialog *dialog) GtkWidget *box; int index; - g_return_if_fail (dialog != NULL); + g_return_val_if_fail (dialog != NULL, 0); box = gtk_hbox_new (FALSE, FALSE); diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c index eca88b9..2e10019 100644 --- a/gschem/src/o_bus.c +++ b/gschem/src/o_bus.c @@ -66,8 +66,8 @@ void o_bus_end(GschemToplevel *w_current, int w_x, int w_y) GList *prev_conn_objects = NULL; g_assert( w_current->inside_action != 0 ); - g_return_val_if_fail (toplevel != NULL, FALSE); - g_return_val_if_fail (page != NULL, FALSE); + g_return_if_fail (toplevel != NULL); + g_return_if_fail (page != NULL); /* erase the rubberbus */ /* o_bus_invalidate_rubber (w_current); */ diff --git a/gschem/src/x_grid.c b/gschem/src/x_grid.c index 9024a3e..3634e30 100644 --- a/gschem/src/x_grid.c +++ b/gschem/src/x_grid.c @@ -398,7 +398,7 @@ int x_grid_query_drawn_spacing (GschemToplevel *w_current) { GRID_MODE grid_mode; - g_return_if_fail (w_current != NULL); + g_return_val_if_fail (w_current != NULL, -1); grid_mode = gschem_options_get_grid_mode (w_current->options); diff --git a/libgeda/src/scheme_object.c b/libgeda/src/scheme_object.c index b7cab09..dbb1018 100644 --- a/libgeda/src/scheme_object.c +++ b/libgeda/src/scheme_object.c @@ -1995,8 +1995,8 @@ SCM_DEFINE (set_picture_x, "%set-picture!", 7, 0, 0, * \param filename_s New filename for \a obj_s. * \return \a obj_s. */ -SCM_DEFINE (set_picture_data_vector_x, "%set-picture-data/vector!", - 3, 0, 0, (SCM obj_s, SCM data_s, SCM filename_s), +SCM_DEFINE (set_picture_data_vector_x, "%set-picture-data/vector!", 3, 0, 0, + (SCM obj_s, SCM data_s, SCM filename_s), "Set a picture object's data from a vector.") { SCM vec_s = scm_any_to_s8vector (data_s); -- 2.4.5