rep-gtk r398 - in trunk: . examples m4



Author: chrisb
Date: Thu Jan  1 20:53:29 2009
New Revision: 398
URL: http://svn.gnome.org/viewvc/rep-gtk?rev=398&view=rev

Log:
added m4 directory to make libtool 1.x shut up
dropped libgnome libgnomeui libgnomecanvas and libglade bindings
dropped examples related to dropped bindings
reworked configure.in
also delete ebuild upon make distclean
reworked autogen.sh
regenerated config.h.in


Added:
   trunk/m4/
Removed:
   trunk/examples/canvas-pixbuf-test
   trunk/examples/canvas-test
   trunk/examples/gnome-test
   trunk/examples/rep-ui
   trunk/examples/rep-ui.glade
   trunk/examples/simple.glade
   trunk/examples/test-libglade
   trunk/gnome-canvas-support.c
   trunk/gnome-canvas.defs
   trunk/gnomelib-support.c
   trunk/gnomelib.defs
   trunk/gnomeui-support.c
   trunk/gnomeui.defs
   trunk/libglade-support.c
   trunk/libglade.defs
   trunk/rep-gnome.h
   trunk/rep-libglade.h
Modified:
   trunk/ChangeLog
   trunk/Makefile.in
   trunk/NEWS
   trunk/autogen.sh
   trunk/config.h.in
   trunk/configure.in
   trunk/install-sh
   trunk/rep-gtk.spec.in

Modified: trunk/Makefile.in
==============================================================================
--- trunk/Makefile.in	(original)
+++ trunk/Makefile.in	Thu Jan  1 20:53:29 2009
@@ -8,19 +8,6 @@
 SRCS = rep-gtk.c gtk-support.c gtk-compat.c glib-glue.c gdk-glue.c gtk-glue.c gdk-pixbuf-glue.c
 OBJS = $(SRCS:.c=.lo)
 
-LIBGLADE_SRCS = libglade-support.c libglade-glue.c
-LIBGLADE_OBJS = libglade-support.lo libglade-glue.lo
-GNOME_LIBGLADE_OBJS = libglade-gnome-support.lo libglade-glue.lo
-
-GNOMELIB_SRCS = gnomelib-support.c gnomelib-glue.c
-GNOMELIB_OBJS = $(GNOMELIB_SRCS:.c=.lo)
-
-GNOMEUI_SRCS = gnomeui-support.c gnomeui-glue.c
-GNOMEUI_OBJS = $(GNOMEUI_SRCS:.c=.lo)
-
-GNOME_CANVAS_SRCS = gnome-canvas-support.c gnome-canvas-glue.c
-GNOME_CANVAS_OBJS = $(GNOME_CANVAS_SRCS:.c=.lo)
-
 OUT = @OUT@
 OUT_DESTS = $(foreach x, $(OUT), gui/$(x))
 
@@ -36,13 +23,9 @@
 CFLAGS= CFLAGS@ @DEVELOPMENT_CFLAGS@
 LDFLAGS= LDFLAGS@
 override CPPFLAGS += -DHAVE_CONFIG_H -I.
-override CFLAGS += @GLIB_CFLAGS@ @GTK_CFLAGS@ @REP_CFLAGS@ @LIBGLADE_CFLAGS@ @GNOME_CFLAGS@ @GNOMEUI_CFLAGS@ @GNOME_CANVAS_CFLAGS@ @GDK_PIXBUF_CFLAGS@
+override CFLAGS += @GLIB_CFLAGS@ @GTK_CFLAGS@ @REP_CFLAGS@ @GDK_PIXBUF_CFLAGS@
 REP_SGTK_LIBS= GLIB_LIBS@ @LIBS@
 REP_GTK_LIBS= GTK_LIBS@ @LIBS@
-REP_LIBGLADE_LIBS= LIBGLADE_LIBS@ @LIBS@
-REP_GNOMELIB_LIBS= GNOME_LIBS@ @LIBS@
-REP_GNOMEUI_LIBS= GNOMEUI_LIBS@ @LIBS@
-REP_GNOME_CANVAS_LIBS= GNOME_CANVAS_LIBS@ @LIBS@
 
 INSTALL= INSTALL@
 INSTALL_DATA= INSTALL_DATA@
@@ -65,40 +48,22 @@
 gtk-2/gtk.la : $(OBJS)
 	$(rep_DL_LD) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(REP_GTK_LIBS)
 
-gtk-2/libglade.la : $(LIBGLADE_OBJS)
-	$(rep_DL_LD) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(REP_LIBGLADE_LIBS)
-
-gtk-2/gnome-lib.la : $(GNOMELIB_OBJS)
-	$(rep_DL_LD) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(REP_GNOMELIB_LIBS)
-
-gtk-2/gnome-ui.la : $(GNOMEUI_OBJS)
-	$(rep_DL_LD) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(REP_GNOMEUI_LIBS)
-
-gtk-2/gnome-canvas.la : $(GNOME_CANVAS_OBJS)
-	$(rep_DL_LD) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(REP_GNOME_CANVAS_LIBS)
-
 %-glue.c : %.defs build-gtk.jlc
 	rep build-gtk.jlc -f build-gtk-batch $< $@
 
 build-gtk.jlc : build-gtk.jl
 	rep compiler -f compile-batch $<
 
-libglade-gnome-support.lo : libglade-support.c
-	$(rep_LIBTOOL) --mode=compile --tag=CC $(CC) -c $(CPPFLAGS) $(CFLAGS) \
-	 @GNOME_LIBGLADE_CFLAGS@ -DGLADE_GNOME=1 $< -o $@
-
 install : all installdirs
 	set -e; for f in $(OUT); do \
 	  $(rep_DL_INSTALL) $$f $(DESTDIR)$(installdir)/gui/gtk-2; \
 	done
 	set -e; for f in $(OUT_DESTS); do \
 	  case $$f in \
-	    gui/gtk-2/gtk.la|gui/gtk-2/gnome-lib.la) \
+	    gui/gtk-2/gtk.la) \
 	      printf "\nrep_requires='gui.gtk-2.types'\n" >>$(DESTDIR)$(installdir)/$$f ;; \
-	    gui/gtk-2/libglade.la|gui/gtk-2/gnome-ui.la|gui/gtk-2/gdk-pixbuf.la) \
+	    gui/gtk-2/gdk-pixbuf.la) \
 	      printf "\nrep_requires='gui.gtk-2.gtk'\n" >>$(DESTDIR)$(installdir)/$$f ;; \
-	    gui/gtk-2/gnome-canvas*.la) \
-	      printf "\nrep_requires='gui.gtk-2.gnome-ui'\n" >>$(DESTDIR)$(installdir)/$$f ;; \
 	  esac; \
 	done
 	for f in $(OUT_DESTS); do \
@@ -124,7 +89,7 @@
 
 distclean : clean
 	rm -f Makefile config.cache config.log config.status config.h
-	rm -f rep-gtk.spec rep-gtk.pc
+	rm -f rep-gtk.spec rep-gtk.pc rep-gtk*.ebuild
 
 svnclean : distclean
 	rm -f aclocal.m4 configure

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Thu Jan  1 20:53:29 2009
@@ -1,8 +1,10 @@
 0.18.4:
 	- small code cleanup
-	- updated configure.in since rep.m4 has been dropped
+	- reworked configure.in
 	- added ebuild (Thanks to Harald van Dijk)
-	- fixed autogen for libtool >2.2
+	- reworked autogen.sh
+	- removed libgnome, libgnomeui, libgnomecanvas and libglade bindings
+	- removed examples related to removed bindings
 
 0.18.3:
 	- fixed the broken GtkCombo() Widgets

Modified: trunk/autogen.sh
==============================================================================
--- trunk/autogen.sh	(original)
+++ trunk/autogen.sh	Thu Jan  1 20:53:29 2009
@@ -1,18 +1,32 @@
 #!/bin/sh
 
+if [ -f Makefile ]; then
+	make distclean
+fi
+
+if [ -f aclocal.m4 ]; then
+	rm -fv aclocal.m4
+fi
+
+if [ -d m4 ]; then
+	rm -fv m4/*
+fi
+
 if [ -f configure.in ]; then
-  if grep "A[MC]_CONFIG_HEADER" configure.in >/dev/null; then
-    if [ ! -f config.h.in ]; then
+  if grep "AC_CONFIG_HEADER" configure.in >/dev/null; then
       echo "Running autoheader"
       autoheader || exit 1
-    fi
   fi
-  if grep "A[MC]_PROG_LIBTOOL" configure.in >/dev/null; then
+  if grep "AM_PROG_LIBTOOL" configure.in >/dev/null; then
     echo "Running libtoolize"
-    libtoolize --force --copy --install || exit 1
+    lver=$(libtool --version | grep 1.5)
+    if [[ ${lver} != "" ]]; then
+	    libtoolize --force --copy || exit 1
+    else    libtoolize --force --copy --install || exit 1
+    fi
   fi
   echo "Running aclocal $ACLOCAL_FLAGS"
-  aclocal $ACLOCAL_FLAGS || exit 1
+  aclocal -I m4 $ACLOCAL_FLAGS || exit 1
 
   echo "Running autoconf $AUTOCONF_FLAGS"
   autoconf $AUTOCONF_FLAGS || exit 1

Modified: trunk/config.h.in
==============================================================================
--- trunk/config.h.in	(original)
+++ trunk/config.h.in	Thu Jan  1 20:53:29 2009
@@ -1,21 +1,5 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the `gdk_color_copy' function. */
-#undef HAVE_GDK_COLOR_COPY
-
-/* Define to 1 if you have the `gtk_signal_set_class_function_full' function.
-   */
-#undef HAVE_GTK_SIGNAL_SET_CLASS_FUNCTION_FULL
-
-/* Define to 1 if you have the `gtk_type_get_info' function. */
-#undef HAVE_GTK_TYPE_GET_INFO
-
-/* Define to 1 if you have the `gtk_widget_peek_colormap' function. */
-#undef HAVE_GTK_WIDGET_PEEK_COLORMAP
-
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Thu Jan  1 20:53:29 2009
@@ -2,14 +2,14 @@
 dnl  Copyright (C) 1998 John Harper <john dcs warwick ac uk>
 dnl  $Id: configure.in,v 1.44 2003/08/02 05:36:24 jsh Exp $
 dnl
-dnl  This file is part of Jade.
+dnl  This file is part of rep-gtk.
 dnl
-dnl  Jade is free software; you can redistribute it and/or modify it
+dnl  rep-gtk is free software; you can redistribute it and/or modify it
 dnl  under the terms of the GNU General Public License as published by
 dnl  the Free Software Foundation; either version 2, or (at your option)
 dnl  any later version.
 dnl
-dnl  Jade is distributed in the hope that it will be useful, but
+dnl  rep-gtk is distributed in the hope that it will be useful, but
 dnl  WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl  GNU General Public License for more details.
@@ -21,16 +21,16 @@
 m4_pattern_allow
 
 AC_REVISION($Revision: 1.44 $)
-
 AC_INIT(rep-gtk.h)
+
 AC_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_PROG_LIBTOOL
 
 dnl Release versioning info
 version="0.18.4"
 
-OUT="gtk-2/types.la gtk-2/gtk.la"
-AC_SUBST(OUT)
-
 dnl Find the system type; this isn't crucial
 AC_CANONICAL_HOST
 
@@ -43,99 +43,30 @@
 AC_PROG_GCC_TRADITIONAL
 AC_PROG_LIBTOOL
 
-dnl If using GCC and it doesn't look as though the cflags have been
-dnl set explicitly, add some warning options. Turn off implicit-int
-dnl warnings since the X11 includes on Solaris generate a lot of these
-if test "x${GCC}" = "xyes" -a "x$CFLAGS" = "x-g -O2"; then
-  CFLAGS="${CFLAGS} -Wall -Wmissing-prototypes -Wno-implicit-int"
-fi
-
 dnl Check for librep
-PKG_CHECK_MODULES(LIBREP, librep >= 0.17.3)
-REP_EXECDIR="`pkg-config --variable=repcommonexecdir librep`"
-REP_CFLAGS="`pkg-config --cflags librep`"
-
-AC_SUBST(REP_EXECDIR)
-AC_SUBST(REP_CFLAGS)
+PKG_CHECK_MODULES(LIBREP, librep >= 0.17.3
+		  ,REP_EXECDIR="`pkg-config --variable=repcommonexecdir librep`"
+		  REP_CFLAGS="`pkg-config --cflags librep`"
+		  ,AC_MSG_ERROR([can't locate librep]))
 
 dnl Check for glib
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6)
 
 dnl Check for GTK
-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6,,AC_ERROR(need at least Gtk+ version 2.6))
-
-PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 2.6)
+pc_libs=""
 
-pc_libs="gtk+-2.0 gdk-pixbuf-2.0"
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6
+		  ,pc_libs+="gtk+-2.0 "
+		  ,)
 
-dnl Check for libgnome
-AC_MSG_CHECKING([for GNOME libs])
-AC_ARG_WITH(gnome,
- [  --with-gnome            Build GNOME wrappers
-  --without-gnome         Don't wrap GNOME], [], [with_gnome=no])
-if test "$with_gnome" != "no"; then
-  GNOME_VERSION="`pkg-config --modversion libgnome-2.0`"
-  if test $? -eq 0; then
-    dnl XXX FIXME properly
-    GNOME_LIBS="`pkg-config --libs libgnome-2.0`"
-    GNOME_CFLAGS="`pkg-config --cflags libgnome-2.0`"
-    GNOMEUI_LIBS="`pkg-config --libs libgnomeui-2.0`"
-    GNOMEUI_CFLAGS="`pkg-config --cflags libgnomeui-2.0`"
-    GNOME_CANVAS_LIBS="`pkg-config --libs libgnomecanvas-2.0`"
-    GNOME_CANVAS_CFLAGS="`pkg-config --cflags libgnomecanvas-2.0`"
-    AC_MSG_RESULT([$GNOME_VERSION])
-    OUT="$OUT gtk-2/gnome-lib.la gtk-2/gnome-ui.la gtk-2/gnome-canvas.la"
-    with_gnome=yes
-  elif test "$with_gnome" = "yes"; then
-    AC_MSG_ERROR([can't run pkg-config]);
-  else
-    with_gnome=no
-  fi
-fi
-
-if [[ $with_gnome == yes ]]; then
-	pc_libs="$pc_libs libgnome-2.0 libgnomeui-2.0 libgnomecanvas-2.0"
-fi
-	
-
-AC_SUBST(GNOME_VERSION)
-AC_SUBST(GNOME_LIBS)
-AC_SUBST(GNOME_CFLAGS)
-AC_SUBST(GNOMEUI_LIBS)
-AC_SUBST(GNOMEUI_CFLAGS)
-AC_SUBST(GNOME_CANVAS_LIBS)
-AC_SUBST(GNOME_CANVAS_CFLAGS)
-
-AC_ARG_ENABLE(paranoia, 	[  --enable-paranoia       use wall, wno-error, ansi, pedantic compiler flags],	[paranoia=$enableval],	[paranoia="no"])
-
-if test $paranoia = "yes"; then
-	DEVELOPMENT_CFLAGS+=" -Wall -ansi -pedantic"
-fi
-
-dnl Check for libglade
-AC_ARG_WITH(libglade,
- [  --with-libglade         Build libglade wrappers (dynamic GUI builder)
-  --without-libglade      Don't wrap libglade], [], [with_libglade=yes])
-if test "$with_libglade" = "yes"; then
-  PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4,
-		    [OUT="$OUT gtk-2/libglade.la"])
-fi
-
-if [[ $with_libglade == yes ]]; then
-	pc_libs="$pc_libs libglade-2.0"
-fi
+PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 2.6
+		  ,pc_libs+="gdk-pixbuf-2.0")
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_C_INLINE
 AC_TYPE_SIZE_T
 
-dnl Check for cutting edge Gtk functions
-saved_LIBS="$LIBS"
-LIBS="$GTK_LIBS $saved_LIBS"
-AC_CHECK_FUNCS(gdk_color_copy gtk_widget_peek_colormap gtk_type_get_info gtk_signal_set_class_function_full)
-LIBS="$saved_LIBS"
-
 dnl locale checks
 AC_CHECK_FUNCS(setlocale)
 AC_CHECK_HEADERS(locale.h)
@@ -148,9 +79,14 @@
 AC_SUBST(CFLAGS)
 AC_SUBST(DEVELOPMENT_CFLAGS)
 AC_SUBST(LIBS)
+AC_SUBST(REP_EXECDIR)
+AC_SUBST(REP_CFLAGS)
 
 AC_DEFINE_UNQUOTED([REP_GTK_VERSION], "${version}", [Version of rep-gtk]) 
 
+OUT="gtk-2/types.la gtk-2/gtk.la"
+AC_SUBST(OUT)
+
 AC_CONFIG_FILES([
 Makefile
 rep-gtk.pc
@@ -166,10 +102,6 @@
 GLIB_VERSION="`pkg-config --modversion glib-2.0`"
 CAIRO_VERSION="`pkg-config --modversion cairo`"
 GTK_VERSION="`pkg-config --modversion gtk+-2.0`"
-GNOME_VERSION="`pkg-config --modversion libgnome-2.0`"
-GNOME_UI_VERSION="`pkg-config --modversion libgnomeui-2.0`"
-GNOME_CANVAS_VERSION="`pkg-config --modversion libgnomecanvas-2.0`"
-GLADE_VERSION="`pkg-config --modversion libglade-2.0`"
 
 echo "
   == == == == == == == == == == == == ==
@@ -196,14 +128,6 @@
   cairo:	$CAIRO_VERSION
   gtk+:		$GTK_VERSION"
 
-if [[ $with_gnome == yes ]]; then
-	echo "  gnome:	$GNOME_VERSION
-  gnomeui:	$GNOME_UI_VERSION
-  gnome-canvas:	$GNOME_CANVAS_VERSION"
-fi
-if [[ $with_libglade == yes ]]; then
-	echo "  glade:	$GLADE_VERSION"
-fi
 echo "  
   == == == == == == == == == == == == ==
 "

Modified: trunk/install-sh
==============================================================================
--- trunk/install-sh	(original)
+++ trunk/install-sh	Thu Jan  1 20:53:29 2009
@@ -1,250 +1,519 @@
-#! /bin/sh
-#
+#!/bin/sh
 # install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
 #
-# Copyright 1991 by the Massachusetts Institute of Technology
 #
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission.  M.I.T. makes no representations about the
-# suitability of this software for any purpose.  It is provided "as is"
-# without express or implied warranty.
+# FSF changes to this file are in the public domain.
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
 # `make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
 # This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
+# from scratch.
 
+nl='
+'
+IFS=" ""	$nl"
 
 # set DOITPROG to echo to test this script
 
 # Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
 
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
 
-# put in absolute paths if you don't have them in your path; or use env. vars.
+# Desired mode of installed file.
+mode=0755
 
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
 rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
+stripcmd=
 
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
+src=
+dst=
+dir_arg=
+dst_arg=
 
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
+copy_on_change=false
+no_target_directory=
 
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
 
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
 
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
 
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
 
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
 
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
 
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
+    -C) copy_on_change=true;;
 
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@% g' -e 's ^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
+    -d) dir_arg=true;;
 
-	pathcomp="${pathcomp}/"
-done
-fi
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
 
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
+    --help) echo "$usage"; exit $?;;
 
-# If we're going to rename the final executable, determine the name now.
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
 
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
+    -o) chowncmd="$chownprog $2"
+	shift;;
 
-# don't allow the sed command to completely eliminate the filename
+    -s) stripcmd=$stripprog;;
 
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
+    -t) dst_arg=$2
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
 
-# Make a temp file name in the proper directory.
+    *)  break;;
+  esac
+  shift
+done
 
-	dsttmp=$dstdir/#inst.$$#
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $  
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+  done
+fi
 
-# Move or copy the file name to the temp name
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
 
-	$doit $instcmd $src $dsttmp &&
+if test -z "$dir_arg"; then
+  trap '(exit $?); exit' 1 2 13 15
 
-	trap "rm -f ${dsttmp}" 0 &&
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
 
-# and set any options; do chmod last to preserve setuid bits
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dst_arg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst;;
+    esac
 
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
 
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-# Now rename the file to the real destination.
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writeable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
 
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	-*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test -z "$d" && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
 
-fi &&
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
 
+    trap '' 0
+  fi
+done
 
-exit 0
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:

Modified: trunk/rep-gtk.spec.in
==============================================================================
--- trunk/rep-gtk.spec.in	(original)
+++ trunk/rep-gtk.spec.in	Thu Jan  1 20:53:29 2009
@@ -17,27 +17,6 @@
 on Marius Vollmer's guile-gtk package (initially version 0.15, updated
 to 0.17), with a new glue-code generator.
 
-%package libglade
-Summary: librep binding for the libglade library for loading user interfaces.
-Group: Development/Languages
-Requires: %{name} = @version@, libglade
-
-%description libglade
-This is a binding of libglade for the librep Lisp interpreter. libglade
-allows applications to dynamically load XML descriptions of GTK+ widget
-hierarchies. These hierarchies may be created by the GLADE GUI builder.
-
-%package gnome
-Summary: GNOME binding for librep
-Group: Development/Languages
-Requires: %{name} = @version@, gnome-libs, libglade
-
-%description gnome
-This is a binding of the various GNOME libraries for the librep Lisp
-interpreter. It include support for the basic GNOME functions, the
-GNOME user interface widgets, the GNOME Canvas architecture, and the
-GNOME version of libglade.
-
 %prep
 %setup
 
@@ -68,21 +47,6 @@
 %{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/types.so*
 %{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/types.la
 
-%files libglade
-%defattr(-,root,root)
-%doc libglade.defs examples/test-libglade examples/simple.glade
-%doc examples/rep-ui examples/rep-ui.glade
-%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/libglade.so*
-%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/libglade.la
-
-%files gnome
-%defattr(-,root,root)
-%doc gnome*.defs gdk-pixbuf.defs libglade.defs
-%doc examples/*
-%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/gnome*.so*
-%{_libexecdir}/rep/%{_target_platform}/gui/gtk-2/gnome*.la
-
-
 %changelog
 * Tue Jun 13 2000 John Harper <john dcs warwick ac uk>
 - use better macros



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]