Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Jan 2014 01:50:01 GMT
From:      Stephen Hurd <shurd@sasktel.net>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/185398: Fix comms/xmorse build with Clang
Message-ID:  <201401020150.s021o1b8090817@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/185398; it has been noted by GNATS.

From: Stephen Hurd <shurd@sasktel.net>
To: bug-followup@FreeBSD.org, shurd@sasktel.net
Cc:  
Subject: Re: ports/185398: Fix comms/xmorse build with Clang
Date: Wed, 01 Jan 2014 11:40:07 -0800

 This is a multi-part message in MIME format.
 --------------080001020402030006040008
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Actually, here it is with a completely new Makefile which uses dynamic 
 linking, supports STAGEDIR, doesn't need root privs to create the 
 package, fixes all the warnings clang emitted, and is smaller than both 
 the original Makefile and the patch.
 
 --------------080001020402030006040008
 Content-Type: text/plain; charset=us-ascii;
  name="xmorse-svnpatch.txt"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="xmorse-svnpatch.txt"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 338396)
 +++ Makefile	(working copy)
 @@ -3,7 +3,7 @@
  
  PORTNAME=	xmorse
  PORTVERSION=	20041125
 -PORTREVISION=	7
 +PORTREVISION=	8
  CATEGORIES=	comms hamradio
  MASTER_SITES=	http://c2.com/morse/files/SourceCode/ \
  		http://www.525183.com/freebsd/xmorse/ \
 @@ -21,6 +21,11 @@
  
  PLIST_FILES=	bin/xmorse
  NO_WRKSUBDIR=	yes
 +MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX} INSTALL_PROGRAM=${INSTALL_PROGRAM}
  
 -NO_STAGE=	yes
 -.include <bsd.port.mk>
 +.include <bsd.port.pre.mk>
 +
 +post-patch:
 +	${CP} ${FILESDIR}/Makefile ${WRKSRC}
 +
 +.include <bsd.port.post.mk>
 Index: files/Makefile
 ===================================================================
 --- files/Makefile	(revision 0)
 +++ files/Makefile	(working copy)
 @@ -0,0 +1,26 @@
 +CXXFLAGS+= -MMD `fltk-config --cxxflags` `sdl-config --cflags`
 +PREFIX	?= /usr/local
 +INSTALL_PROGRAM	?=	${INSTALL} -o root -g wheel -m 755
 +
 +all: xmorse
 +
 +.-include "m.d"
 +.-include "Bargraph.d"
 +.-include "Codebox.d"
 +.-include "Cw.d"
 +.-include "Knob.d"
 +
 +m.cxx: m.fl
 +	fluid -c m.fl
 +
 +xmorse: m.o Bargraph.o Codebox.o Cw.o Knob.o
 +	${CXX} -o$@ $> `fltk-config --ldflags` `sdl-config --libs`
 +
 +install: xmorse
 +	${INSTALL_PROGRAM} xmorse ${PREFIX}/bin/xmorse
 +
 +clean:
 +	-rm *.o
 +	-rm *.d
 +	-rm m.cxx m.h
 +	-rm xmorse
 
 Property changes on: files/Makefile
 ___________________________________________________________________
 Added: svn:keywords
 ## -0,0 +1 ##
 +FreeBSD=%H
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Index: files/patch-Bargraph.cxx
 ===================================================================
 --- files/patch-Bargraph.cxx	(revision 0)
 +++ files/patch-Bargraph.cxx	(working copy)
 @@ -0,0 +1,11 @@
 +--- Bargraph.cxx.orig	2004-08-25 17:18:01.000000000 -0700
 ++++ Bargraph.cxx	2014-01-01 10:26:23.000000000 -0800
 +@@ -82,7 +82,7 @@
 +     if (child(i)->visible()) nd++;
 +   int dx = w()/nd;				// Slider horizontal "period"
 +   int width = dx*nd - gap;			// Width of slider array
 +-  int x0 = w()-width >> 1;			// Inset to 1st slider
 ++  int x0 = (w()-width) >> 1;			// Inset to 1st slider
 +   width = dx-gap;				// Width of individual Slider
 +   for (int i = 0; i < children(); i++) {	// Loop to reposition sliders
 +     Fl_Slider* s = (Fl_Slider*) child(i);	//   Pointer to this Slider
 
 Property changes on: files/patch-Bargraph.cxx
 ___________________________________________________________________
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Index: files/patch-Help.h
 ===================================================================
 --- files/patch-Help.h	(revision 0)
 +++ files/patch-Help.h	(working copy)
 @@ -0,0 +1,11 @@
 +--- Help.h.orig	2014-01-01 10:24:05.000000000 -0800
 ++++ Help.h	2014-01-01 10:24:10.000000000 -0800
 +@@ -2,7 +2,7 @@
 +  * generated from the original HTML file by the script, help.py.
 +  */
 + 
 +-static char* HelpString =
 ++static const char* HelpString =
 +   "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
 +   "<html>\n"
 +   "<head>\n"
 
 Property changes on: files/patch-Help.h
 ___________________________________________________________________
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 Index: files/patch-Makefile
 ===================================================================
 --- files/patch-Makefile	(revision 338396)
 +++ files/patch-Makefile	(working copy)
 @@ -1,28 +0,0 @@
 ---- ./Makefile.orig	2004-09-29 22:12:16.000000000 +0000
 -+++ ./Makefile	2007-11-24 19:55:15.000000000 +0000
 -@@ -36,6 +36,25 @@
 - 	strip m
 - 	rm *.o m.cxx m.h
 - 
 -+# Regular "make" is what you want for the FreeBSD version
 -+
 -+all: m.fl Bargraph.cxx Bargraph.h Codebox.cxx Codebox.h Cw.cxx Cw.h \
 -+    Knob.cxx Knob.h Help.h m.fl
 -+	fluid -c m.fl
 -+	g++ -c -Os `fltk-config --cxxflags` m.cxx
 -+	g++ -c -Os `fltk-config --cxxflags` Bargraph.cxx
 -+	g++ -c -Os `fltk-config --cxxflags` Codebox.cxx
 -+	g++ -c -Os `fltk-config --cxxflags` Knob.cxx
 -+	g++ -c -Os `sdl-config    --cflags` Cw.cxx
 -+	g++ -om m.o Bargraph.o Codebox.o Cw.o Knob.o \
 -+          `sdl-config --static-libs` \
 -+          `fltk-config --ldstaticflags`
 -+	strip m
 -+	rm *.o m.cxx m.h
 -+
 -+install: m
 -+	${INSTALL} -o root -g wheel -m 0555 m ${PREFIX}/bin/xmorse
 -+
 - # Besemer's Python extension version
 - 
 - cw.so: cw.pyx Cw.cxx Cw.h
 Index: files/patch-m.fl
 ===================================================================
 --- files/patch-m.fl	(revision 338396)
 +++ files/patch-m.fl	(working copy)
 @@ -1,5 +1,23 @@
 ---- m.fl.orig	2011-07-17 14:56:20.000000000 -0400
 -+++ m.fl	2011-07-17 14:56:31.000000000 -0400
 +--- m.fl.orig	2004-08-13 16:38:24.000000000 -0700
 ++++ m.fl	2014-01-01 10:25:10.000000000 -0800
 +@@ -188,7 +188,7 @@
 +         }
 +         menuitem {} {
 +           label Numbers
 +-          callback {char* nrs = "0123456789";
 ++          callback {const char* nrs = "0123456789";
 + if (o->mvalue()->value())
 +   Lesson->enable(nrs);
 + else
 +@@ -199,7 +199,7 @@
 +         }
 +         menuitem {} {
 +           label Symbols
 +-          callback {char* syms = "./=?";
 ++          callback {const char* syms = "./=?";
 + if (o->mvalue()->value())
 +   Lesson->enable(syms);
 + else
  @@ -231,7 +231,7 @@
         }
       }
 
 --------------080001020402030006040008--



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