pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/33205: sysutils/gnome-vfs2 fails to build on Solaris with SunPro compiler




> From: segv%netctl.net@localhost
> 
> >Number:         33205
> >Category:       pkg
> >Synopsis:       sysutils/gnome-vfs2 fails to build on Solaris with SunPro 
compiler 
> Undefined                       first referenced
>  symbol                             in file
> login_tty                           ../libgnomevfs/.libs/libgnomevfs-2.so

-------------------patch for Makefile.common ---------
diff -bur ./Makefile.common /home/cvsmywork/pkgsrc/sysutils/gnome-vfs2//Makefile
.common
--- ./Makefile.common   Fri Apr 21 13:03:03 2006
+++ /home/cvsmywork/pkgsrc/sysutils/gnome-vfs2//Makefile.common Fri Apr 21 12:52
:09 2006
@@ -58,6 +58,10 @@
        ${TOUCH} ${BUILDLINK_DIR}/include/sys/fstyp.h
 .endif
 
+.if ${OPSYS} == "SunOS"
+CFLAGS.SunOS+= -DMISSING_LOGIN_TTY
+.endif
+
 #
 # The following stuff is to allow easy building of modules distributed within
 # gnome-vfs2 as independent packages.
--------------------------------------------


The PLIST is wrong:

*.mo go into lib/locale and not share/locale.
PLIST
....
lib/locale/af/LC_MESSAGES/gnome-vfs-2.0.mo
lib/locale/am/LC_MESSAGES/gnome-vfs-2.0.mo
lib/locale/ar/LC_MESSAGES/gnome-vfs-2.0.mo
lib/locale/az/LC_MESSAGES/gnome-vfs-2.0.mo
etc...



Gilles
--- libgnomevfs/gnome-vfs-pty.c.orig    Tue Nov 22 15:10:17 2005
+++ libgnomevfs/gnome-vfs-pty.c Fri Apr 21 12:13:23 2006
@@ -307,6 +307,7 @@
        }
 
 #ifdef HAVE_UTMP_H
+#if  !defined(MISSING_LOGIN_TTY)
        /* This sets stdin, stdout, stderr to the socket */     
        if (login && login_tty (fd) == -1) {
                g_printerr ("mount child process login_tty failed: %s\n", 
strerror (errno));
@@ -313,6 +314,7 @@
                return -1;
        }
 #endif
+#endif
        
        /* Signal to the parent that we've finished setting things up by
         * sending an arbitrary byte over the status pipe and waiting for
@@ -629,6 +631,7 @@
 static char *
 _gnome_vfs_pty_ptsname(int master)
 {
+#ifndef __APPLE__
 #if defined(HAVE_PTSNAME_R)
        gsize len = 1024;
        char *buf = NULL;
@@ -674,6 +677,7 @@
                return g_strdup_printf("/dev/pts/%d", pty);
        }
 #endif
+#endif /* __APPLE__ */
        return NULL;
 }
 
@@ -681,10 +685,10 @@
 _gnome_vfs_pty_getpt(void)
 {
        int fd, flags;
-#ifdef HAVE_GETPT
+#if defined(HAVE_GETPT) && !defined(__APPLE__)
        /* Call the system's function for allocating a pty. */
        fd = getpt();
-#elif defined(HAVE_POSIX_OPENPT)
+#elif defined(HAVE_POSIX_OPENPT) && !defined(__APPLE__)
        fd = posix_openpt(O_RDWR | O_NOCTTY);
 #else
        /* Try to allocate a pty by accessing the pty master multiplex. */
@@ -703,7 +707,7 @@
 static int
 _gnome_vfs_pty_grantpt(int master)
 {
-#ifdef HAVE_GRANTPT
+#if defined(HAVE_GRANTPT) && !defined(__APPLE__)
        return grantpt(master);
 #else
        return 0;
@@ -713,6 +717,9 @@
 static int
 _gnome_vfs_pty_unlockpt(int fd)
 {
+#ifdef __APPLE__
+       return -1;
+#else
 #ifdef HAVE_UNLOCKPT
        return unlockpt(fd);
 #elif defined(TIOCSPTLCK)
@@ -721,6 +728,7 @@
 #else
        return -1;
 #endif
+#endif
 }
 
 static int


Home | Main Index | Thread Index | Old Index