svn commit: r349780 - in head/misc/estic: . files

Dirk Meyer dinoex at FreeBSD.org
Mon Mar 31 17:45:15 UTC 2014


Author: dinoex
Date: Mon Mar 31 17:45:13 2014
New Revision: 349780
URL: http://svnweb.freebsd.org/changeset/ports/349780
QAT: https://qat.redports.org/buildarchive/r349780/

Log:
  - fix makefiles to honor CXX and CXXFLAGS
  - fix some C++ problems
  - mark BROKEN on FreeBSD10, no gcc 4.2

Added:
  head/misc/estic/files/patch-areacode.c   (contents, props changed)
  head/misc/estic/files/patch-machine.h   (contents, props changed)
Modified:
  head/misc/estic/Makefile
  head/misc/estic/files/patch-areacode-make
  head/misc/estic/files/patch-areacode-make-x
  head/misc/estic/files/patch-estic-freebsd-x.mak
  head/misc/estic/files/patch-estic-freebsd.mak
  head/misc/estic/files/patch-spunk-freebsd-x.mak
  head/misc/estic/files/patch-spunk-freebsd.mak

Modified: head/misc/estic/Makefile
==============================================================================
--- head/misc/estic/Makefile	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/Makefile	Mon Mar 31 17:45:13 2014	(r349780)
@@ -14,6 +14,8 @@ MAINTAINER=		dinoex at FreeBSD.org
 COMMENT=		Controller for ISDN TK-Anlage (PBX) made by Istec
 
 USES=		zip
+USE_CSTD=	gnu89
+
 NO_WRKSUBDIR=	yes
 
 # Personal Preferences, Where to install.
@@ -33,8 +35,16 @@ NO_OPTIONS_SORT=yes
 DTR_OFF_DESC=	use dtr-off patch
 X11_USE=	xorg=x11
 
+FIXME=	areacode estic spunk
+
 .include <bsd.port.options.mk>
 
+.if ${OSVERSION} > 1000000
+.if ${CC} != gcc42
+BROKEN=	needs gcc4.2 to compile
+.endif
+.endif
+
 .if ${PORT_OPTIONS:MX11}
 X_OR_NOT=-x
 PLIST_SUB+=	WITHOUT_X="@comment "
@@ -55,6 +65,11 @@ pre-patch:
 #	@${PATCH} -d ${PATCH_WRKSRC}/estic --forward --quiet -E -p0 --batch < ${WRKDIR}/estic.diff
 
 do-configure:
+.for i in ${FIXME}
+	${REINPLACE_CMD} -e 's|CC|CXX|' -e 's|CFLAGS|CXXFLAGS|' \
+		${WRKSRC}/${i}/make/freebsd.mak \
+		${WRKSRC}/${i}/make/freebsd-x.mak
+.endfor
 	@cd ${WRKSRC}/spunk ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} dep
 	@cd ${WRKSRC}/areacode ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} dep
 	@cd ${ESTIC} ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} dep

Modified: head/misc/estic/files/patch-areacode-make
==============================================================================
--- head/misc/estic/files/patch-areacode-make	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/files/patch-areacode-make	Mon Mar 31 17:45:13 2014	(r349780)
@@ -1,5 +1,5 @@
---- areacode/make/freebsd.mak.orig	Tue Sep  6 09:54:20 2005
-+++ areacode/make/freebsd.mak	Tue Sep  6 09:54:20 2005
+--- areacode/make/freebsd.mak.orig	2014-03-28 16:39:11.000000000 +0100
++++ areacode/make/freebsd.mak	2014-03-28 16:39:50.000000000 +0100
 @@ -0,0 +1,115 @@
 +# *****************************************************************************
 +# *									      *
@@ -99,7 +99,7 @@
 +
 +depend dep:
 +	@echo "Creating dependency information"
-+	$(CC) -DFREEBSD -MM *.c > .depend
++	$(CC) $(CFLAGS) -MM *.c > .depend
 +
 +# ------------------------------------------------------------------------------
 +# clean up

Modified: head/misc/estic/files/patch-areacode-make-x
==============================================================================
--- head/misc/estic/files/patch-areacode-make-x	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/files/patch-areacode-make-x	Mon Mar 31 17:45:13 2014	(r349780)
@@ -1,5 +1,5 @@
---- areacode/make/freebsd-x.mak.orig	Tue Sep  6 09:54:20 2005
-+++ areacode/make/freebsd-x.mak	Tue Sep  6 09:54:20 2005
+--- areacode/make/freebsd-x.mak.orig	2014-03-28 16:39:11.000000000 +0100
++++ areacode/make/freebsd-x.mak	2014-03-28 16:42:03.000000000 +0100
 @@ -0,0 +1,115 @@
 +# *****************************************************************************
 +# *									      *
@@ -99,7 +99,7 @@
 +
 +depend dep:
 +	@echo "Creating dependency information"
-+	$(CC) -DFREEBSD -MM *.c > .depend
++	$(CC) $(CFLAGS) -MM *.c > .depend
 +
 +# ------------------------------------------------------------------------------
 +# clean up

Added: head/misc/estic/files/patch-areacode.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/estic/files/patch-areacode.c	Mon Mar 31 17:45:13 2014	(r349780)
@@ -0,0 +1,11 @@
+--- areacode/areacode.c.orig	1997-02-16 11:24:50.000000000 +0100
++++ areacode/areacode.c	2014-03-31 19:07:27.000000000 +0200
+@@ -352,7 +352,7 @@
+ /* Load a part of the table into memory */
+ {
+     u32 SpaceNeeded = (Desc->Last - Desc->First + 1) * sizeof (u32);
+-    Desc->Table = malloc (SpaceNeeded);
++    Desc->Table = (u32*) malloc (SpaceNeeded);
+     if (Desc->Table == 0) {
+         /* Out of memory. There is no problem with this now since we do
+          * not really need the table in core memory (it speeds things up,

Modified: head/misc/estic/files/patch-estic-freebsd-x.mak
==============================================================================
--- head/misc/estic/files/patch-estic-freebsd-x.mak	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/files/patch-estic-freebsd-x.mak	Mon Mar 31 17:45:13 2014	(r349780)
@@ -1,12 +1,11 @@
---- estic/make/freebsd-x.mak.orig	Fri Jan 31 03:57:24 1997
-+++ estic/make/freebsd-x.mak	Tue Sep  6 09:54:21 2005
-@@ -27,12 +27,13 @@
+--- estic/make/freebsd-x.mak.orig	1997-01-31 03:57:24.000000000 +0100
++++ estic/make/freebsd-x.mak	2014-03-28 17:00:36.000000000 +0100
+@@ -27,12 +27,12 @@
  AR = ar
  LD = ld
  ZIP = zip
 -CC = g++
-+CXX ?= g++
-+CC = ${CXX}
++CC?= g++
  
  LIB	= ../spunk/spunk.a
  INCDIR	= ../spunk
@@ -16,7 +15,7 @@
  
  
  # ------------------------------------------------------------------------------
-@@ -71,10 +72,10 @@
+@@ -71,10 +71,10 @@
  		icintcon.o	\
  		iclog.o		\
  		icmsgwin.o	\
@@ -29,7 +28,7 @@
  
  # ------------------------------------------------------------------------------
  #
-@@ -82,7 +83,7 @@
+@@ -82,7 +82,7 @@
  all:	xestic
  
  xestic: $(LIB) $(OBJS)
@@ -38,7 +37,16 @@
  
  
  # ------------------------------------------------------------------------------
-@@ -114,10 +115,10 @@
+@@ -90,7 +90,7 @@
+ 
+ depend dep:
+ 	@echo "Creating dependency information"
+-	$(CC) -I$(INCDIR) -DFREEBSD -MM *.cc > .depend
++	$(CC) $(CFLAGS) -MM *.cc > .depend
+ 
+ # ------------------------------------------------------------------------------
+ # Create a ZIP file
+@@ -114,9 +114,10 @@
  
  clean:
  	-rm -f *.bak *~
@@ -48,6 +56,5 @@
  zap:	clean
 -	-rm -f *.o
  	-rm -f .depend
--
  
  

Modified: head/misc/estic/files/patch-estic-freebsd.mak
==============================================================================
--- head/misc/estic/files/patch-estic-freebsd.mak	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/files/patch-estic-freebsd.mak	Mon Mar 31 17:45:13 2014	(r349780)
@@ -1,12 +1,11 @@
---- estic/make/freebsd.mak.orig	Fri Jan 31 03:57:24 1997
-+++ estic/make/freebsd.mak	Tue Sep  6 09:54:21 2005
-@@ -27,11 +27,12 @@
+--- estic/make/freebsd.mak.orig	1997-01-31 03:57:24.000000000 +0100
++++ estic/make/freebsd.mak	2014-03-28 17:03:18.000000000 +0100
+@@ -27,11 +27,11 @@
  AR = ar
  LD = ld
  ZIP = zip
 -CC = g++
-+CXX ?= g++
-+CC = ${CXX}
++CC?= g++
  
  LIB	= ../spunk/spunk.a
  INCDIR	= ../spunk
@@ -15,7 +14,7 @@
  
  
  # ------------------------------------------------------------------------------
-@@ -70,10 +71,10 @@
+@@ -70,10 +70,10 @@
  		icintcon.o	\
  		iclog.o		\
  		icmsgwin.o	\
@@ -28,7 +27,7 @@
  
  # ------------------------------------------------------------------------------
  #
-@@ -81,7 +82,7 @@
+@@ -81,14 +81,14 @@
  all:	estic
  
  estic:	$(LIB) $(OBJS)
@@ -37,7 +36,15 @@
  
  # ------------------------------------------------------------------------------
  # Create a dependency file
-@@ -112,9 +113,10 @@
+ 
+ depend dep:
+ 	@echo "Creating dependency information"
+-	$(CC) -I$(INCDIR) -DFREEBSD -MM *.cc > .depend
++	$(CC) $(CFLAGS) -MM *.cc > .depend
+ 
+ # ------------------------------------------------------------------------------
+ # Create a ZIP file
+@@ -112,9 +112,10 @@
  
  clean:
  	-rm -f *.bak *~

Added: head/misc/estic/files/patch-machine.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/estic/files/patch-machine.h	Mon Mar 31 17:45:13 2014	(r349780)
@@ -0,0 +1,11 @@
+--- spunk/machine.h.orig	1997-02-18 14:41:50.000000000 +0100
++++ spunk/machine.h	2014-03-28 16:58:13.000000000 +0100
+@@ -238,7 +238,7 @@
+ #    define CPU_LITTLE_ENDIAN
+ #elif (BYTE_ORDER == BIG_ENDIAN)
+ #    define CPU_BIG_ENDIAN
+-#elif
++#else
+ #    error Byte order not defined!
+ #endif
+ 

Modified: head/misc/estic/files/patch-spunk-freebsd-x.mak
==============================================================================
--- head/misc/estic/files/patch-spunk-freebsd-x.mak	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/files/patch-spunk-freebsd-x.mak	Mon Mar 31 17:45:13 2014	(r349780)
@@ -1,11 +1,11 @@
---- spunk/make/freebsd-x.mak.orig	Sun Nov 24 22:33:26 1996
-+++ spunk/make/freebsd-x.mak	Tue Sep  6 09:54:21 2005
+--- spunk/make/freebsd-x.mak.orig	1996-11-24 22:33:26.000000000 +0100
++++ spunk/make/freebsd-x.mak	2014-03-28 16:29:37.000000000 +0100
 @@ -27,10 +27,10 @@
  AR = ar
  LD = ld
  ZIP = zip
 -CC = g++
-+CC = $(CXX)
++CC?= g++
  
  # Flags for the gnu compiler
 -CFLAGS	= -DFREEBSD -DUSE_OLD_TTY -g -Wall -x c++ -I /usr/X11R6/include -fno-implicit-templates -DEXPLICIT_TEMPLATES
@@ -24,7 +24,16 @@
  
  lib:	$(LIB)
  
-@@ -192,10 +192,12 @@
+@@ -149,7 +149,7 @@
+ 
+ depend dep:
+ 	@echo "Creating dependency information"
+-	$(CC) -DFREEBSD -MM *.cc > .depend
++	$(CC) $(CFLAGS) -MM *.cc > .depend
+ 
+ # ------------------------------------------------------------------------------
+ # Target specific files
+@@ -192,9 +192,10 @@
  
  clean:
  	-rm -f *~ linuxsrc/*~ bsdsrc/*~ unixsrc/*~
@@ -34,7 +43,5 @@
  zap:	clean
 -	-rm -f *.o
  	-rm -f .depend
-+
- 
  
  

Modified: head/misc/estic/files/patch-spunk-freebsd.mak
==============================================================================
--- head/misc/estic/files/patch-spunk-freebsd.mak	Mon Mar 31 17:30:27 2014	(r349779)
+++ head/misc/estic/files/patch-spunk-freebsd.mak	Mon Mar 31 17:45:13 2014	(r349780)
@@ -1,11 +1,11 @@
---- spunk/make/freebsd.mak.orig	Sun Nov 24 22:33:26 1996
-+++ spunk/make/freebsd.mak	Tue Sep  6 09:54:21 2005
+--- spunk/make/freebsd.mak.orig	1996-11-24 22:33:26.000000000 +0100
++++ spunk/make/freebsd.mak	2014-03-28 16:25:12.000000000 +0100
 @@ -27,10 +27,10 @@
  AR = ar
  LD = ld
  ZIP = zip
 -CC = g++
-+CC = $(CXX)
++CC?= g++
  
  # Flags for the gnu compiler
 -CFLAGS	= -DFREEBSD -DUSE_OLD_TTY -g -Wall -x c++ -fno-implicit-templates -DEXPLICIT_TEMPLATES
@@ -22,6 +22,15 @@
  
  lib:	$(LIB)
  
+@@ -150,7 +150,7 @@
+ 
+ depend dep:
+ 	@echo "Creating dependency information"
+-	$(CC) -DFREEBSD -MM *.cc > .depend
++	$(CC) ${CFLAGS} -MM *.cc > .depend
+ 
+ # ------------------------------------------------------------------------------
+ # Target specific files
 @@ -196,9 +196,10 @@
  
  clean:


More information about the svn-ports-all mailing list