Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jun 2002 00:27:24 -0700
From:      bsmith <bsmith@atomz.com>
To:        gnome@freebsd.org
Cc:        alfred@freebsd.org
Subject:   Re: xscreensaver
Message-ID:  <20020610002724.K1920@foo-sc.atomz.com>
In-Reply-To: <20020610054059.GG88163@elvis.mu.org>; from alfred@freebsd.org on Sun, Jun 09, 2002 at 10:40:59PM -0700
References:  <20020609185159.J1920@foo-sc.atomz.com> <20020610054059.GG88163@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
The following diff's are fixes to allow xscreensaver to build properly on 
FreeBSD.  The problem currently is that the data returned by pkg-config:
root0pctaurii~ pkg-config gtk+ --libs
     -L/usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -lintl -lXext -lX11 -lm -lglib12  

Will not allow applications to properly build:
cc -Wall -Wstrict-prototypes -Wnested-externs -Wno-format -std=c89 -U__STRICT_ANSI__ -L/usr/X11R6/lib -o xscreensaver-demo-Gtk prefs.o dpms.o remote.o exec.o ../utils/resources.o ../utils/usleep.o ../utils/visual.o demo-Gtk.o demo-Gtk-conf.o demo-Gtk-widgets.o demo-Gtk-support.o  -L/usr/local/lib  -L/usr/X11R6/lib \
-Wl,-E   -Wl,-E   -Wl,-E  -L/usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -lcapplet -lORBitCosNaming -lORBit -lIIOP -lORBitutil -lgnorba -lXpm -ljpeg -lgnomeui -lart_lgpl -lgdk_imlib -ltiff -lungif -lpng -lz -lSM -lICE -lxpg4 -lgnome -lgnomesupport -lesd -laudiofile -lgdk_pixbuf -lgtk12 -lgdk12 -lgmodule12 -lglib12 -lintl -lXext -lX11 -lm    -L/usr/local/lib -lxml2 -lz -lgiconv -lm   -lXmu -L/usr/local/lib -lxml2 -lz -lgiconv -lm    -lSM -lICE -lXt -lX11 \
 -lXext 
/usr/libexec/elf/ld: cannot find -lgtk
gmake[1]: *** [xscreensaver-demo-Gtk] Error 1
gmake[1]: Leaving directory `/usr/ports/x11/xscreensaver/work/xscreensaver-4.04/driver'
gmake: *** [all] Error 5
*** Error code 2

I imagine there are other ports that are broken because of it.  The simple fix
is to update the .pc files used by pkg-config.  I tested the following diff's
by removing gtk+ and glib from my system.  Doing a make patch, editing the 
.pc.in files.  Doing a make install, and then attempting to build xscreensaver.
After applying the .pc.in patches xscreensaver builds properly.  pkg-config now
says:
root0pdtaurii/usr/X11R6/libdata/pkgconfig pkg-config gtk+ --libs
     -L/usr/local/lib -L/usr/X11R6/lib -lgtk12 -lgdk12 -lintl -lXext -lX11 -lm -lglib12  
root0pdtaurii/usr/X11R6/libdata/pkgconfig uname -a
FreeBSD taurii.home 4.6-RC FreeBSD 4.6-RC #1: Sat Jun  1 21:55:18 PDT 2002     root@taurii.home:/usr/obj/usr/src/sys/TAURII  i386

-Ben Smith

DIFFS:

root0pbtaurii/usr/ports/x11-toolkits/gtk12/work/gtk+-1.2.10 diff -u gtk+.pc.in.old gtk+.pc.in
--- gtk+.pc.in.old      Sun Jun  9 23:46:45 2002
+++ gtk+.pc.in  Sun Jun  9 23:46:52 2002
@@ -7,5 +7,5 @@
 Description: GIMP Tool Kit
 Version: @VERSION@
 Requires: gdk
-Libs: -L${libdir} -lgtk
+Libs: -L${libdir} -lgtk12
 Cflags: 
root1pbtaurii/usr/ports/x11-toolkits/gtk12/work/gtk+-1.2.10 diff -u gdk.pc.in.old gdk.pc.in
--- gdk.pc.in.old       Sun Jun  9 23:46:15 2002
+++ gdk.pc.in   Sun Jun  9 23:46:23 2002
@@ -7,5 +7,5 @@
 Description: GIMP Drawing Kit
 Version: @VERSION@
 Requires: glib
-Libs: -L${libdir} @x_ldflags@ -lgdk @INTLLIBS@ @GDK_WLIBS@ @x_libs@ -lm
+Libs: -L${libdir} @x_ldflags@ -lgdk12 @INTLLIBS@ @GDK_WLIBS@ @x_libs@ -lm
 Cflags: -I${includedir}/gtk-1.2 @x_cflags@

root0pbtaurii/usr/ports/devel/glib12/work/glib-1.2.10 diff -u glib.pc.in.old glib.pc.in
--- glib.pc.in.old      Sun Jun  9 23:51:43 2002
+++ glib.pc.in  Sun Jun  9 23:51:38 2002
@@ -6,6 +6,6 @@
 Name: GLib
 Description: C Utility Library
 Version: @VERSION@
-Libs: -L${libdir} -lglib
+Libs: -L${libdir} -lglib12
 Cflags: -I${includedir}/glib-1.2 -I${libdir}/glib/include 

Alfred Perlstein [alfred@freebsd.org] wrote:
> Can you use "diff -u" and tell the person in charge of the port as well?
> 
> 
> * bsmith <bsmith@atomz.com> [020609 18:52] wrote:
> > 
> >  fixes the xscreensaver build. These could be patched in their original ports
> >  -ben
> 
> -- 
> -Alfred Perlstein [alfred@freebsd.org]
> 'Instead of asking why a piece of software is using "1970s technology,"
>  start asking why software is ignoring 30 years of accumulated wisdom.'
> Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020610002724.K1920>