aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libhoard
diff options
context:
space:
mode:
authorosa <osa@FreeBSD.org>2003-06-25 22:37:49 +0800
committerosa <osa@FreeBSD.org>2003-06-25 22:37:49 +0800
commitfcc6067aad20e4762483dd94d8c8b92412f7ab20 (patch)
tree08144d2dbe1d964cbb5ec26ffcd144ec165e93a8 /devel/libhoard
parent91f4c936a54fc7eb8349cb5807f323e7da62fd09 (diff)
downloadfreebsd-ports-gnome-fcc6067aad20e4762483dd94d8c8b92412f7ab20.tar.gz
freebsd-ports-gnome-fcc6067aad20e4762483dd94d8c8b92412f7ab20.tar.zst
freebsd-ports-gnome-fcc6067aad20e4762483dd94d8c8b92412f7ab20.zip
Port does not compile on systems older than 5.1-RELEASE
(needs _SC_NPROCESSORS_ONLN). Respect CC, CXX, CFLAGS and CXXFLAGS. Pointed out by: kris Approved by: fjoe (mentor)
Diffstat (limited to 'devel/libhoard')
-rw-r--r--devel/libhoard/Makefile20
-rw-r--r--devel/libhoard/files/patch-Makefile11
-rw-r--r--devel/libhoard/files/patch-Makefile.common66
-rw-r--r--devel/libhoard/files/testos.c16
4 files changed, 75 insertions, 38 deletions
diff --git a/devel/libhoard/Makefile b/devel/libhoard/Makefile
index ea580ff87e4e..83ce7950a62b 100644
--- a/devel/libhoard/Makefile
+++ b/devel/libhoard/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libhoard
PORTVERSION= 2.1.2d
+PORTREVISION?= 1
CATEGORIES= devel
MASTER_SITES= http://www.cs.umass.edu/~emery/software/
@@ -21,25 +22,10 @@ INSTALLS_SHLIB= YES
.include <bsd.port.pre.mk>
-TESTPROG= testos
-
-check-os:
-.if !defined(SKIP_OS_TEST)
- -@${MKDIR} ${WRKSRC} ; \
- ${RM} -f ${WRKSRC}/${TESTPROG} ; \
- ${CC} ${PTHREAD_CFLAGS} ${PTHREAD_LIBS} -o ${WRKSRC}/${TESTPROG} \
- ${PATCHDIR}/${TESTPROG}.c > /dev/null 2>&1 ;
- @if [ ! -f ${WRKSRC}/${TESTPROG} ] ; \
- then \
- ${ECHO_MSG} "You must have a version of FreeBSD later than 4.8-STABLE" ; \
- ${ECHO_MSG} "27 May 2003 or 5.1-RELEASE to compile and use libhoard" ; \
- exit 1 ; \
- fi
- @${WRKSRC}/${TESTPROG} 2>/dev/null
+.if ${OSVERSION} < 501100
+IGNORE= "You must have a FreeBSD 5.1-RELEASE or better"
.endif
-pre-fetch: check-os
-
do-install:
${INSTALL_DATA} ${WRKSRC}/libhoard.so ${PREFIX}/lib/libhoard.so.1
${LN} -sf ${PREFIX}/lib/libhoard.so.1 ${PREFIX}/lib/libhoard.so
diff --git a/devel/libhoard/files/patch-Makefile b/devel/libhoard/files/patch-Makefile
new file mode 100644
index 000000000000..4e5fdc99076c
--- /dev/null
+++ b/devel/libhoard/files/patch-Makefile
@@ -0,0 +1,11 @@
+--- Makefile.orig Wed Jun 25 17:44:34 2003
++++ Makefile Wed Jun 25 17:45:03 2003
+@@ -37,7 +37,7 @@
+ $(LIBSO) libhoard.o $(OBJS) -o $@ $(LIBS)
+
+ libhoard.o: libhoard.cpp $(SRCS)
+- $(CXX) $(CXXFLAGS) -c $< -o $@
++ $(CXX) $(CXXFLAGS) $(FEATURESXX) -c $< -o $@
+ endif
+
+ ifeq ($(WINDOWS),1)
diff --git a/devel/libhoard/files/patch-Makefile.common b/devel/libhoard/files/patch-Makefile.common
index 7834d417d6eb..2128b9ee4e0a 100644
--- a/devel/libhoard/files/patch-Makefile.common
+++ b/devel/libhoard/files/patch-Makefile.common
@@ -1,5 +1,5 @@
--- Makefile.common.orig Mon Apr 7 19:57:11 2003
-+++ Makefile.common Sun May 25 12:53:38 2003
++++ Makefile.common Wed Jun 25 17:41:29 2003
@@ -21,8 +21,17 @@
# or supply new values as parameters to make, e.g.:
# make USE_WINDOWS=1 DEBUG=1
@@ -66,12 +66,68 @@
ifdef BROKEN
CPATH = /usr/bin/
endif
-@@ -127,7 +149,7 @@
+@@ -125,10 +147,8 @@
+ endif
+
ifdef GNUC
- CC = $(CPATH)gcc
- CXX = $(CPATH)g++
+- CC = $(CPATH)gcc
+- CXX = $(CPATH)g++
- FEATURES = -fPIC -D__STRICT_ANSI__ -D_GNU_SOURCE -D_REENTRANT -Wall -fno-exceptions #-fPIC
+- OPTIMIZE = -O6 -fexpensive-optimizations -finline-functions -fomit-frame-pointer -ffast-math
+ FEATURES = -fPIC -D__STRICT_ANSI__ -D_GNU_SOURCE -D_REENTRANT -Wall -fno-exceptions -Wno-deprecated
- OPTIMIZE = -O6 -fexpensive-optimizations -finline-functions -fomit-frame-pointer -ffast-math
++ OPTIMIZE =
FEATURESXX = $(FEATURES)
OPTIMIZEXX = $(OPTIMIZE)
+ LIBSO = $(CC) -shared #-nostartfiles
+@@ -144,40 +164,40 @@
+ endif
+
+ else
+- CFLAGS = $(FEATURES) -DNDEBUG $(OPTIMIZE)
+- CXXFLAGS = $(FEATURESXX) -DNDEBUG $(OPTIMIZEXX)
++# CFLAGS = $(FEATURES) -DNDEBUG $(OPTIMIZE)
++# CXXFLAGS = $(FEATURESXX) -DNDEBUG $(OPTIMIZEXX)
+ # CFLAGS = $(FEATURES) /Zi /DEBUG $(OPTIMIZE)
+ # CXXFLAGS = $(FEATURESXX) /Zi /DEBUG $(OPTIMIZEXX)
+ endif
+
+-LIBS = $(LIBTHREAD)
++LIBS = ${PTHREAD_LIBS}
+
+
+ .SUFFIXES: .c .cpp .o .a .so .tex .dvi .ps .png .bmp .ppm .eps .s .obj
+
+ .s.o:
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(FEATURES) -c -o $@ $<
+
+ .c.o:
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(FEATURES) -c -o $@ $<
+
+ .cpp.o:
+- $(CXX) $(CXXFLAGS) -c -o $@ $<
++ $(CXX) $(CXXFLAGS) $(FEATURESXX) -c -o $@ $<
+
+ .c.obj:
+- $(CC) $(CFLAGS) -c -o $@ $<
++ $(CC) $(CFLAGS) $(FEATURES) -c -o $@ $<
+
+ .cpp.obj:
+- $(CXX) $(CXXFLAGS) -c -o $@ $<
++ $(CXX) $(CXXFLAGS) $(FEATURESXX) -c -o $@ $<
+
+ .o:
+- $(CC) $(CFLAGS) $< -o $@ $(LIBS)
++ $(CC) $(CFLAGS) $(FEATURES) $< -o $@ $(LIBS)
+
+ .c:
+- $(CC) $(CFLAGS) $< -o $@ $(LIBS)
++ $(CC) $(CFLAGS) $(FEATURES) $< -o $@ $(LIBS)
+
+ .cpp:
+- $(CXX) $(CXXFLAGS) $< -o $@ $(LIBS)
++ $(CXX) $(CXXFLAGS) $(FEATURESXX) $< -o $@ $(LIBS)
+
+ .o.a:
+ -rm -f $@
diff --git a/devel/libhoard/files/testos.c b/devel/libhoard/files/testos.c
deleted file mode 100644
index c4413db9c9af..000000000000
--- a/devel/libhoard/files/testos.c
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <pthread.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main(int argc, char *argv[])
-{
- static int level;
-
- level = pthread_getconcurrency();
- (void)pthread_setconcurrency(level++);
-
- printf("LIBC_R TEST PASSED: All ok\n");
-
- exit(0);
-}