aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2002-09-17 20:52:06 +0800
committernetchild <netchild@FreeBSD.org>2002-09-17 20:52:06 +0800
commitcca0fd5b9b19558f8b421a58d3536923fd114926 (patch)
tree994f9be990e472b2b72572542e0da72d2cf6ce5a /devel
parent33b01dfbc93515347b3a5938f3ac29ce74ab3609 (diff)
downloadfreebsd-ports-gnome-cca0fd5b9b19558f8b421a58d3536923fd114926.tar.gz
freebsd-ports-gnome-cca0fd5b9b19558f8b421a58d3536923fd114926.tar.zst
freebsd-ports-gnome-cca0fd5b9b19558f8b421a58d3536923fd114926.zip
Patch to be able to make a slave port for Intels C/C++ compiler.
Submitted by: marius@alchemy.franken.de Approved by: Paul Marquis <pmarquis@pobox.com> (maintainer)
Diffstat (limited to 'devel')
-rw-r--r--devel/stlport/Makefile22
-rw-r--r--devel/stlport/files/patch-stlport::_cmath.h11
-rw-r--r--devel/stlport/files/patch-stlport::c_locale.h11
-rw-r--r--devel/stlport/files/patch-stlport::cwchar2
-rw-r--r--devel/stlport/files/patch-stlport::stlcomp.h12
-rw-r--r--devel/stlport/files/src::icc-freebsd.mak53
-rw-r--r--devel/stlport/files/stlport::stl_icc.h8
-rw-r--r--devel/stlport/files/test::eh::icc-freebsd.mak76
-rw-r--r--devel/stlport/pkg-plist13
9 files changed, 198 insertions, 10 deletions
diff --git a/devel/stlport/Makefile b/devel/stlport/Makefile
index e9be2833fb90..d12172b5c56e 100644
--- a/devel/stlport/Makefile
+++ b/devel/stlport/Makefile
@@ -8,8 +8,10 @@
PORTNAME= stlport
PORTVERSION= 4.5.3
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.stlport.com/archive/
+PKGNAMESUFFIX= -${COMPILER}
DISTNAME= STLport-${PORTVERSION:S/.b/-b/}
MAINTAINER= pmarquis@pobox.com
@@ -23,9 +25,11 @@ BROKEN= "Requires /usr/include/wchar.h for compilation"
WRKSRC= ${WRKDIR}/STLport-${PORTVERSION:S/.b/b/}/src
PATCH_WRKSRC= ${WRKDIR}/STLport-${PORTVERSION:S/.b/b/}
USE_GMAKE= yes
-MAKEFILE= gcc-freebsd.mak
+COMPILER?= gcc
+MAKEFILE= ${COMPILER}-freebsd.mak
MAKE_ARGS+= INSTALLDIR=${PREFIX} PTHREAD_CFLAGS=${PTHREAD_CFLAGS} \
PTHREAD_LIBS=${PTHREAD_LIBS}
+PLIST_SUB= COMPILER=${COMPILER}
INSTALL_TARGET= install_unix
INSTALLS_SHLIB= yes
@@ -34,7 +38,12 @@ INSTALLS_SHLIB= yes
BROKEN= "Not supported on systems prior to FreeBSD 4.4"
.endif
-.if ${OSVERSION} < 460000
+.if ${COMPILER} == icc
+CC= icc
+CXX= icpc
+.endif
+
+.if ${COMPILER} == gcc && ${OSVERSION} < 460000
pre-everything:
@${ECHO_MSG}
@${ECHO_MSG} "There may be a bug in your version of gcc's exception"
@@ -42,6 +51,13 @@ pre-everything:
@${ECHO_MSG} "or above."
.endif
+post-patch:
+ @${CP} ${FILESDIR}/src::icc-freebsd.mak ${WRKSRC}/icc-freebsd.mak
+ @${CP} ${FILESDIR}/stlport::stl_icc.h \
+ ${WRKSRC}/../stlport/config/stl_icc.h
+ @${CP} ${FILESDIR}/test::eh::icc-freebsd.mak \
+ ${WRKSRC}/../test/eh/icc-freebsd.mak
+
post-install:
${FIND} ${PREFIX}/include/stlport -name \*.orig -delete
.if !defined(NOPORTDOCS)
@@ -51,7 +67,7 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/../doc/images/* ${DOCSDIR}/images
.endif
-.if ${OSVERSION} >= 46000
+.if ${OSVERSION} >= 46000 || ${COMPILER} == icc
post-build: test
.endif
diff --git a/devel/stlport/files/patch-stlport::_cmath.h b/devel/stlport/files/patch-stlport::_cmath.h
new file mode 100644
index 000000000000..28a209d5ead7
--- /dev/null
+++ b/devel/stlport/files/patch-stlport::_cmath.h
@@ -0,0 +1,11 @@
+--- stlport/stl/_cmath.h.orig Wed Jul 24 03:31:26 2002
++++ stlport/stl/_cmath.h Wed Jul 24 03:32:38 2002
+@@ -100,7 +100,7 @@
+ # define _STLP_DO_TAN(_Tp) _STLP_VENDOR_CSTD::tan
+ # define _STLP_DO_TANH(_Tp) _STLP_VENDOR_CSTD::tanh
+ # define _STLP_DO_EXP(_Tp) _STLP_VENDOR_CSTD::exp
+-# if defined (__GNUC__) || defined ( __IBMCPP__ ) || defined (__SUNPRO_CC)
++# if defined (__GNUC__) || defined ( __IBMCPP__ ) || defined (__SUNPRO_CC) || defined (__ICC)
+ # define _STLP_DO_HYPOT(_Tp) ::hypot
+ # else
+ # define _STLP_DO_HYPOT(_Tp) _STLP_VENDOR_CSTD::hypot
diff --git a/devel/stlport/files/patch-stlport::c_locale.h b/devel/stlport/files/patch-stlport::c_locale.h
new file mode 100644
index 000000000000..7caa6c41eaa5
--- /dev/null
+++ b/devel/stlport/files/patch-stlport::c_locale.h
@@ -0,0 +1,11 @@
+--- stlport/stl/c_locale.h.orig Wed Jul 24 03:17:57 2002
++++ stlport/stl/c_locale.h Wed Jul 24 03:19:25 2002
+@@ -178,7 +178,7 @@
+ _Locale_SPACE ) /* Printable */
+ # endif /* __Lynx__ */
+
+-#if defined(__GNUC__) || defined (__BORLANDC__) || defined (__COMO__)
++#if defined(__GNUC__) || defined (__BORLANDC__) || defined (__COMO__) || defined (__ICC)
+
+ # if defined (__CYGWIN__)
+
diff --git a/devel/stlport/files/patch-stlport::cwchar b/devel/stlport/files/patch-stlport::cwchar
index 9666cff4f004..4df0e93ede50 100644
--- a/devel/stlport/files/patch-stlport::cwchar
+++ b/devel/stlport/files/patch-stlport::cwchar
@@ -4,7 +4,7 @@
# include <stl/_prolog.h>
# endif
-+#ifdef __FreeBSD__
++#if defined (__FreeBSD__) && defined (__GNUC__)
+# include <../wchar.h>
+#endif
+
diff --git a/devel/stlport/files/patch-stlport::stlcomp.h b/devel/stlport/files/patch-stlport::stlcomp.h
new file mode 100644
index 000000000000..14b6a3cd1855
--- /dev/null
+++ b/devel/stlport/files/patch-stlport::stlcomp.h
@@ -0,0 +1,12 @@
+--- stlport/config/stlcomp.h.orig Wed Jul 24 02:21:28 2002
++++ stlport/config/stlcomp.h Wed Jul 24 02:21:16 2002
+@@ -103,6 +103,9 @@
+ # elif defined (__FCC_VERSION)
+ /* Fujutsu Compiler, v4.0 assumed */
+ # include <config/stl_fujitsu.h>
++/* Intel(R) C++ Compiler */
++# elif defined (__ICC)
++# include <config/stl_icc.h>
+ # else
+ /* Unable to identify the compiler, issue error diagnostic.
+ * Edit <config/stl_mycomp.h> to set STLport up for your compiler. */
diff --git a/devel/stlport/files/src::icc-freebsd.mak b/devel/stlport/files/src::icc-freebsd.mak
new file mode 100644
index 000000000000..94c448b236cc
--- /dev/null
+++ b/devel/stlport/files/src::icc-freebsd.mak
@@ -0,0 +1,53 @@
+#
+# Note : this makefile is for Intel(R) C++ Compiler Version 6.0 !
+#
+
+#
+# compiler
+#
+CC= icc
+CXX= icpc
+
+#
+# Basename for libraries
+#
+LIB_BASENAME = libstlport_icc
+
+#
+# guts for common stuff
+#
+#
+LINK=ar cr
+DYN_LINK=$(CXX) -Qoption,ld,-BOOTSTRAPSTLPORT -shared -o
+
+OBJEXT=o
+DYNEXT=so
+STEXT=a
+RM=rm -rf
+PATH_SEP=/
+MKDIR=mkdir -p
+COMP=ICC-FREEBSD
+INSTALL_STEP = install_unix
+
+all: gmake_message all_dynamic all_static symbolic_links
+
+gmake_message:
+ echo "Note : this makefile requires gmake on FreeBSD"
+
+include common_macros.mak
+
+WARNING_FLAGS= -w1
+
+CXXFLAGS_COMMON = -I${STLPORT_DIR} ${WARNING_FLAGS}
+
+CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O -ip -axiMKW
+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O -ip -axiMKW -KPIC
+
+CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -O -g
+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -O -g -KPIC
+
+CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
+
+include common_percent_rules.mak
+include common_rules.mak
diff --git a/devel/stlport/files/stlport::stl_icc.h b/devel/stlport/files/stlport::stl_icc.h
new file mode 100644
index 000000000000..01d85c66a4ea
--- /dev/null
+++ b/devel/stlport/files/stlport::stl_icc.h
@@ -0,0 +1,8 @@
+/*
+ * STLport configuration file
+ * It is internal STLport header - DO NOT include it directly
+ */
+
+#define _STLP_NO_CSTD_FUNCTION_IMPORTS
+
+#define _STLP_LONG_LONG long long
diff --git a/devel/stlport/files/test::eh::icc-freebsd.mak b/devel/stlport/files/test::eh::icc-freebsd.mak
new file mode 100644
index 000000000000..ec8da6ca52c0
--- /dev/null
+++ b/devel/stlport/files/test::eh::icc-freebsd.mak
@@ -0,0 +1,76 @@
+# This requires GNU make.
+
+srcdir = .
+VPATH = .
+SHELL=/bin/sh
+
+# point this to proper location
+STL_INCL=-I../../stlport
+
+AUX_LIST=TestClass.cpp main.cpp nc_alloc.cpp random_number.cpp
+
+TEST_LIST=test_algo.cpp \
+test_algobase.cpp test_list.cpp test_slist.cpp \
+test_bit_vector.cpp test_vector.cpp \
+test_deque.cpp test_set.cpp test_map.cpp \
+test_hash_map.cpp test_hash_set.cpp test_rope.cpp \
+test_string.cpp test_bitset.cpp test_valarray.cpp
+
+LIST=${AUX_LIST} ${TEST_LIST}
+
+OBJECTS = $(LIST:%.cpp=obj/%.o) $(STAT_MODULE)
+D_OBJECTS = $(LIST:%.cpp=d_obj/%.o) $(STAT_MODULE)
+
+EXECS = $(LIST:%.cpp=%)
+TESTS = $(LIST:%.cpp=%.out)
+TEST_EXE = ./eh_test
+D_TEST_EXE = ./eh_test_d
+
+TEST = ./eh_test.out
+D_TEST = ./eh_test_d.out
+
+CXXFLAGS= -w1 -g -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -DEH_VECTOR_OPERATOR_NEW -DEH_DELETE_HAS_THROW_SPEC
+D_CXXFLAGS = -w1 -g -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} -DEH_VECTOR_OPERATOR_NEW -DEH_DELETE_HAS_THROW_SPEC -D_STLP_DEBUG -D_STLP_USE_STATIC_LIB
+
+check: $(TEST)
+
+LIBS = -lm
+D_LIBSTLPORT = -L../../lib -lstlport_icc_stldebug
+LIBSTLPORT = -L../../lib -lstlport_icc
+
+all: $(TEST_EXE) $(D_TEST_EXE)
+
+check_d: $(D_TEST)
+
+OBJDIR=obj
+D_OBJDIR=d_obj
+
+$(OBJDIR):
+ mkdir obj
+$(D_OBJDIR):
+ mkdir d_obj
+
+
+$(TEST_EXE) : $(OBJDIR) $(OBJECTS)
+ $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBSTLPORT) $(LIBS) -o $(TEST_EXE)
+
+$(D_TEST_EXE) : $(D_OBJDIR) $(D_OBJECTS)
+ $(CXX) $(D_CXXFLAGS) $(D_OBJECTS) $(D_LIBSTLPORT) $(LIBS) -o $(D_TEST_EXE)
+
+
+$(TEST) : $(TEST_EXE)
+ LD_LIBRARY_PATH="../../lib:$(LD_LIBRARY_PATH)" ./$(TEST_EXE) -s 100
+
+$(D_TEST) : $(D_TEST_EXE)
+ LD_LIBRARY_PATH="../../lib:$(LD_LIBRARY_PATH)" ./$(D_TEST_EXE) -s 100
+
+SUFFIXES: .cpp.o
+
+d_obj/%.o : %.cpp
+ $(CXX) $(D_CXXFLAGS) $< -c -o $@
+
+obj/%.o : %.cpp
+ $(CXX) $(CXXFLAGS) $< -c -o $@
+
+clean:
+ rm -rf ${TEST_EXE} *.o */*.o *.core
diff --git a/devel/stlport/pkg-plist b/devel/stlport/pkg-plist
index fa3696cd2726..843eb386a562 100644
--- a/devel/stlport/pkg-plist
+++ b/devel/stlport/pkg-plist
@@ -23,6 +23,7 @@ include/stlport/config/stl_fujitsu.h
include/stlport/config/stl_gcc.h
include/stlport/config/stl_hpacc.h
include/stlport/config/stl_ibm.h
+include/stlport/config/stl_icc.h
include/stlport/config/stl_intel.h
include/stlport/config/stl_kai.h
include/stlport/config/stl_mlc.h
@@ -320,12 +321,12 @@ include/stlport/wrap_std/ostream
include/stlport/wrap_std/sstream
include/stlport/wrap_std/streambuf
include/stlport/wrap_std/strstream
-lib/libstlport_gcc.a
-lib/libstlport_gcc.so
-lib/libstlport_gcc.so_4_5
-lib/libstlport_gcc_stldebug.a
-lib/libstlport_gcc_stldebug.so
-lib/libstlport_gcc_stldebug.so_4_5
+lib/libstlport_%%COMPILER%%.a
+lib/libstlport_%%COMPILER%%.so
+lib/libstlport_%%COMPILER%%.so_4_5
+lib/libstlport_%%COMPILER%%_stldebug.a
+lib/libstlport_%%COMPILER%%_stldebug.so
+lib/libstlport_%%COMPILER%%_stldebug.so_4_5
%%PORTDOCS%%share/doc/stlport/README.BC.html
%%PORTDOCS%%share/doc/stlport/README.CW.html
%%PORTDOCS%%share/doc/stlport/README.DEC.html