summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2014-03-31 17:45:13 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2014-03-31 17:45:13 +0000
commitce934b196720235f84dba05f133028813259d8c5 (patch)
treee5a0f51d26c9cb3aa7003f7663894e834d76a553 /misc
parent- Add staging support (diff)
- fix makefiles to honor CXX and CXXFLAGS
- fix some C++ problems - mark BROKEN on FreeBSD10, no gcc 4.2
Notes
Notes: svn path=/head/; revision=349780
Diffstat (limited to 'misc')
-rw-r--r--misc/estic/Makefile15
-rw-r--r--misc/estic/files/patch-areacode-make6
-rw-r--r--misc/estic/files/patch-areacode-make-x6
-rw-r--r--misc/estic/files/patch-areacode.c11
-rw-r--r--misc/estic/files/patch-estic-freebsd-x.mak25
-rw-r--r--misc/estic/files/patch-estic-freebsd.mak23
-rw-r--r--misc/estic/files/patch-machine.h11
-rw-r--r--misc/estic/files/patch-spunk-freebsd-x.mak19
-rw-r--r--misc/estic/files/patch-spunk-freebsd.mak15
9 files changed, 99 insertions, 32 deletions
diff --git a/misc/estic/Makefile b/misc/estic/Makefile
index b7d2877e8be6..5ad7ead47a27 100644
--- a/misc/estic/Makefile
+++ b/misc/estic/Makefile
@@ -14,6 +14,8 @@ MAINTAINER= dinoex@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
diff --git a/misc/estic/files/patch-areacode-make b/misc/estic/files/patch-areacode-make
index 0c0ee552e2ec..e9e453195748 100644
--- a/misc/estic/files/patch-areacode-make
+++ b/misc/estic/files/patch-areacode-make
@@ -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
diff --git a/misc/estic/files/patch-areacode-make-x b/misc/estic/files/patch-areacode-make-x
index dd0fd61ede16..23be595aa07f 100644
--- a/misc/estic/files/patch-areacode-make-x
+++ b/misc/estic/files/patch-areacode-make-x
@@ -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
diff --git a/misc/estic/files/patch-areacode.c b/misc/estic/files/patch-areacode.c
new file mode 100644
index 000000000000..e9d55a57ee17
--- /dev/null
+++ b/misc/estic/files/patch-areacode.c
@@ -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,
diff --git a/misc/estic/files/patch-estic-freebsd-x.mak b/misc/estic/files/patch-estic-freebsd-x.mak
index 4582aa733c08..e8acd7fc2325 100644
--- a/misc/estic/files/patch-estic-freebsd-x.mak
+++ b/misc/estic/files/patch-estic-freebsd-x.mak
@@ -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
--
diff --git a/misc/estic/files/patch-estic-freebsd.mak b/misc/estic/files/patch-estic-freebsd.mak
index 187e2dbb7b3e..2a7e90b72c05 100644
--- a/misc/estic/files/patch-estic-freebsd.mak
+++ b/misc/estic/files/patch-estic-freebsd.mak
@@ -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 *~
diff --git a/misc/estic/files/patch-machine.h b/misc/estic/files/patch-machine.h
new file mode 100644
index 000000000000..698bfef81070
--- /dev/null
+++ b/misc/estic/files/patch-machine.h
@@ -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
+
diff --git a/misc/estic/files/patch-spunk-freebsd-x.mak b/misc/estic/files/patch-spunk-freebsd-x.mak
index 2ee626383f41..32081e0b74d4 100644
--- a/misc/estic/files/patch-spunk-freebsd-x.mak
+++ b/misc/estic/files/patch-spunk-freebsd-x.mak
@@ -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
-+
-
diff --git a/misc/estic/files/patch-spunk-freebsd.mak b/misc/estic/files/patch-spunk-freebsd.mak
index 9be2ca2366fb..070a3ea9b30c 100644
--- a/misc/estic/files/patch-spunk-freebsd.mak
+++ b/misc/estic/files/patch-spunk-freebsd.mak
@@ -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: