[Lcdproc] graphlcd build fix

Robert Buchholz rbu@gentoo.org
Sat Apr 7 20:20:01 2007


--Apple-Mail-3-101484136
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

Am 27.03.2007 um 21:27 schrieb Bernhard Walle:
> just a patch for the Makefile on http://www.muresan.de/graphlcd/ 
> lcdproc/
> to compile it on x86_64.

Torsten Veller noticed[1] that glcdprocdriver does not link to the
graphlcd-base libraries (libglcddrivers and libglcdgraphics). This is
usually not a problem, because lcdproc links them in, so  
libglcdprocdriver
has the symbols it needs. However, when linked with --as-needed, lcdproc
does *not* link to the libraries (because it does not need them itself),
and glcdprocdriver is there by itself, without them :-/

The attached patch for the glcdprocdriver Makefile fixes this issue
along with the one mentioned by Bernhard.

After that, lcdproc could theoretically stop linking the
graphlcd-libraries by itself.

Regards,

Robert

[1] http://bugs.gentoo.org/173271


--Apple-Mail-3-101484136
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name=glcdprocdriver-0.0.3-makefile.patch
Content-Disposition: attachment;
	filename=glcdprocdriver-0.0.3-makefile.patch

--- ./Makefile	2006-10-05 08:37:03.000000000 +0000
+++ ./Makefile	2007-04-07 19:06:00.000000000 +0000
@@ -11,6 +11,8 @@
 PACKAGE = $(ARCHIVE)
 TMPDIR = /tmp
 
+LIBS=-lglcddrivers -lglcdgraphics
+
 
 LIBNAME = libglcdprocdriver.so
 SONAME  = $(LIBNAME).1
@@ -24,6 +26,9 @@
 
 all: $(LIBNAME)
 
+$(OBJS): %.o: %.c
+	$(CXX) -c -fPIC $(CXXFLAGS) $< -o $@
+
 $(LIBNAME): $(OBJS)
 	$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -Wl,-soname="$(SONAME)" -o $@
 

--Apple-Mail-3-101484136--