ports/157930: [patch] net/tightvnc: respect LOCALBASE|CFLAGS|STRIP

Pan Tsu inyaoo at gmail.com
Thu Jun 16 21:10:10 UTC 2011


>Number:         157930
>Category:       ports
>Synopsis:       [patch] net/tightvnc: respect LOCALBASE|CFLAGS|STRIP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 16 21:10:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Pan Tsu
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
/usr/local -> /nonexistent
>Description:
- fix build on non-default LOCALBASE
- use global CFLAGS picking up any += modifications from make.conf
- strip binaries based on STRIP either explicitly or as part of
  WITH_DEBUG|DEBUG_FLAGS
- silence warning about ServerExtraDefines redefinition on amd64
- regen newline in vnclibs.def patch (fixes editing in emacs)
>How-To-Repeat:
$ export LOCALBASE=/foo DEBUG_FLAGS=-ggdb
$ make install WITH_DEBUG=
[...]
cc -c -O2 -pipe -ansi -pedantic -Dasm=__asm  -I. -I../../../.././/exports/include/X11 -I../../../.././/include/fonts -I../../../.././/exports/include/X11          -I../../cfb -I../../mfb -I../../mi -I../../include -I../../os           -I../../../.././/../include -I/usr/local/include -L/usr/local/lib  -I../../../.././ -I../../../.././/exports/include  -DCSRG_BASED -DSHAPE                                                                                                                                       -DGCCUSESGAS -DSTATIC_COLOR -DAVOID_GLYPHBLT -DPIXPRIV   -D_XSERVER64 -DNDEBUG   -DFUNCPROTO=15 -DNARROWPROTO  -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR -DDDXTIME  cursor.c
rm -f libvnc.a
ar clq libvnc.a init.o sockets.o kbdptr.o cmap.o draw.o cutpaste.o        dispcur.o sprite.o rfbserver.o translate.o httpd.o auth.o        rre.o corre.o stats.o hextile.o zlib.o tight.o cursor.o
ranlib libvnc.a
make: don't know how to make /usr/local/lib/libjpeg.a. Stop
*** Error code 2
>Fix:
--- a.diff begins here ---
Index: net/tightvnc/Makefile
===================================================================
RCS file: /a/.cvsup/ports/net/tightvnc/Makefile,v
retrieving revision 1.40
diff -u -p -r1.40 Makefile
--- net/tightvnc/Makefile	29 Apr 2011 03:42:10 -0000	1.40
+++ net/tightvnc/Makefile	16 Jun 2011 20:34:32 -0000
@@ -71,9 +69,11 @@ post-patch:
 
 do-install:
 	@(cd ${WRKSRC}; ./vncinstall ${PREFIX}/bin ${PREFIX}/man)
+.if defined(STRIP) && ${STRIP} != ""
 .for FILE in Xvnc vncviewer vncpasswd vncconnect
 	@${STRIP_CMD} ${PREFIX}/bin/${FILE}
 .endfor
+.endif
 .ifdef(WITH_JVNC_VIEWER)
 	@${MKDIR} ${DATADIR}/classes
 	${INSTALL_DATA} ${WRKSRC}/classes/*.* ${DATADIR}/classes
Index: net/tightvnc/files/patch-Xvnc::config::cf::FreeBSD.cf
===================================================================
RCS file: /a/.cvsup/ports/net/tightvnc/files/patch-Xvnc::config::cf::FreeBSD.cf,v
retrieving revision 1.4
diff -u -p -r1.4 patch-Xvnc::config::cf::FreeBSD.cf
--- net/tightvnc/files/patch-Xvnc::config::cf::FreeBSD.cf	15 Mar 2009 14:53:57 -0000	1.4
+++ net/tightvnc/files/patch-Xvnc::config::cf::FreeBSD.cf	16 Jun 2011 20:30:01 -0000
@@ -1,18 +1,28 @@
 --- Xvnc/config/cf/FreeBSD.cf.orig	2000-06-11 21:00:51.000000000 +0900
 +++ Xvnc/config/cf/FreeBSD.cf	2009-03-09 08:18:00.000000000 +0900
+@@ -223,7 +223,9 @@ XCOMM operating system:  OSName (OSMajor
+ # define GccGasOption /**/
+ #endif
+ 
++#ifndef x86_64Architecture
+ #define ServerExtraDefines GccGasOption XFree86ServerDefines
++#endif
+ 
+ #define StandardDefines	-DCSRG_BASED
+ 
 @@ -253,11 +253,17 @@
  #endif
  
  #ifdef i386Architecture
 -# define OptimizedCDebugFlags DefaultGcc2i386Opt
-+# define OptimizedCDebugFlags -O2 -pipe
++# define OptimizedCDebugFlags %%CFLAGS%%
  #else
 -# define OptimizedCDebugFlags -O2
-+# define OptimizedCDebugFlags -O2 -pipe
++# define OptimizedCDebugFlags %%CFLAGS%%
  #endif
  
 +#ifdef x86_64Architecture 
-+# define OptimizedCDebugFlags    -O2 -pipe
++# define OptimizedCDebugFlags    %%CFLAGS%%
 +# define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME 
 +# define ServerExtraDefines      GccGasOption XFree86ServerDefines -D_XSERVER64 
 +#endif /* x86_64Architecture */ 
Index: net/tightvnc/files/patch-Xvnc::config::cf::vnclibs.def
===================================================================
RCS file: /a/.cvsup/ports/net/tightvnc/files/patch-Xvnc::config::cf::vnclibs.def,v
retrieving revision 1.4
diff -u -p -r1.4 patch-Xvnc::config::cf::vnclibs.def
--- net/tightvnc/files/patch-Xvnc::config::cf::vnclibs.def	26 Sep 2006 23:32:39 -0000	1.4
+++ net/tightvnc/files/patch-Xvnc::config::cf::vnclibs.def	16 Jun 2011 20:38:54 -0000
@@ -3,16 +3,17 @@
 @@ -5,13 +5,6 @@
   * and programs/Xserver/hw/vnc whenever you change this file.
   */
-
+ 
 -VNCLIBS = $(TOP)/../libvncauth/libvncauth.a
 -
 -#ifdef OSF1Architecture
 -/* Avoid linking with different libjpeg in /usr/shlib under Tru64. */
 -VNCSYSLIBS = /usr/local/lib/libjpeg.a /usr/local/lib/libz.a -lcrypt
 -#else
-+VNCLIBS = $(TOP)/../libvncauth/libvncauth.a /usr/local/lib/libjpeg.a
-+VNCCPPFLAGS = -I$(TOP)/../include -I/usr/local/include -L/usr/local/lib
- VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz -lcrypt
+-VNCSYSLIBS = -L/usr/local/lib -ljpeg -lz -lcrypt
 -#endif
 -
 -VNCCPPFLAGS = -I$(TOP)/../include -I/usr/local/include
++VNCLIBS = $(TOP)/../libvncauth/libvncauth.a %%LOCALBASE%%/lib/libjpeg.a
++VNCCPPFLAGS = -I$(TOP)/../include -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib
++VNCSYSLIBS = -L%%LOCALBASE%%/lib -ljpeg -lz -lcrypt
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list