[Nautilus-list] nautilus and netbsd



Hi

Here is two patches to make nautilus-0.1.0 closer to build on NetBSD.  I
have some patches that are not worthy to showed to the daylight, they will
have to wait.

Unfortunonatly doesn't nautilus work, it dies in a SIGSEGV and doesn't
leave a stacktrace. :(

* patch-aa:

Restore LDFLAGS to a variable that exists. Fixed in currrent source

Check if rpm needs db or not (some os have db as a part of libc), and it
rpm works at all, if not don't set RPM_DIR and dont walk in to
components/rpmview.

Another way of solving the last problem is to specify that you'll need
rpm>=3.x to build nautilus.

--- configure.in.orig	Tue Aug 15 02:26:27 2000
+++ configure.in	Mon Oct 30 20:28:24 2000
@@ -213,14 +213,23 @@
 	])
 dnl =>
 AC_CHECK_LIB(popt, poptParseArgvString, [rpm_libs="$rpm_libs -lpopt"])
+RPM_DIR=
+rpm_db=
 AC_CHECK_LIB(rpm, rpmRunTransactions,[build_rpmview=true],
+  [build_rpmview=false],-lz $rpm_libs)
+if test "X$build_rpmview" = "X"; then
+	ac_cv_lib_rpm_rpmRunTransactions=
+	AC_CHECK_LIB(rpm, rpmRunTransactions,[build_rpmview=true; rpm_db=-db],
   [build_rpmview=false],-lz $rpm_libs -ldb)
-LDFLAGS="$save_LDFLAGS"
+fi
+LDFLAGS="$_save_ldflags"
 if test "x$build_rpmview" = "xtrue" ; then
   AC_DEFINE(HAVE_RPM)
-  RPM_LIBS="-lrpm -lz $rpm_libs -ldb"
+  RPM_LIBS="-lrpm -lz $rpm_libs $rpm_db"
+  RPM_DIR=rpmview
 fi
 AC_SUBST(RPM_LIBS)
+AC_SUBST(RPM_DIR)
 AM_CONDITIONAL(BUILD_RPMVIEW_COMPONENT, test "x$build_rpmview" = "xtrue")
 
 dnl ====================================
--- components/Makefile.am~	Thu Aug 10 01:25:54 2000
+++ components/Makefile.am	Mon Oct 30 20:22:26 2000
@@ -29,7 +29,7 @@
 	tree \
 	websearch \
 	$(SERVICE_SUBDIRS) \
-	rpmview \
+	$(RPM_DIR) \
 	$(RPMVIEW_COMPONENT_SUBDIRS) \
 	$(MOZILLA_COMPONENT_SUBDIRS) \
 	$(NULL)


* patch-a{h,i}

Don't use INSTALL_PROGRAM on scripts since they are not strip(1)able (try
``make install-strip'')

--- src/Makefile.am~	Fri Aug  4 23:27:35 2000
+++ src/Makefile.am	Tue Oct 31 00:19:16 2000
@@ -144,7 +144,7 @@
 	$(mkinstalldirs) $(DESTDIR)/$(prefix)/bin
 	@list='run-nautilus'; for p in $$list; do\
 	  if test -f $(srcdir)/$$p; then \
-	    echo "  $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p"; \
-	    $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p; \
+	    echo "  $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p"; \
+	    $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p; \
 	  else :; fi; \
 	done
--- Makefile.am.orig	Tue Oct 31 00:30:09 2000
+++ Makefile.am	Tue Oct 31 00:30:13 2000
@@ -38,7 +38,7 @@
 	$(mkinstalldirs) $(DESTDIR)/$(prefix)/bin
 	@list='nautilus-clean.sh'; for p in $$list; do\
 	  if test -f $(srcdir)/$$p; then \
-	    echo "  $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p"; \
-	    $(INSTALL_PROGRAM) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p; \
+	    echo "  $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p"; \
+	    $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)/$(prefix)/bin/$$p; \
 	  else :; fi; \
 	done


Other comments:

  mntent.h: setmntent/getmntent/endmntent is a linux-ish.
  it doesn't exist on BSD nor osf

  setmntent doesn't exist on solaris, at least not as documented
  interface. And it only documented to use on mnttab, not (v)fstab.

  In libnautilus-extensions/nautilus-volume-monitor.c you open mnttab with
  fopen and parse it "by hand", you shouldn't use setmntent & co.

  I think you should use rpmReadRC() instead of rpmReadConfigFiles() in 
  components/rpmview/nautilus-rpm-view.c as it is already in rpm-2.5.x
  marked with a comment:

/* rpmReadConfigFiles() is for backwards compatibility only! It won't
   work if building is true! */

That's all I remember right now

Love





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