aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/id3lib/Makefile14
1 files changed, 10 insertions, 4 deletions
diff --git a/audio/id3lib/Makefile b/audio/id3lib/Makefile
index e9f0a9bbae35..cae8173ac2a3 100644
--- a/audio/id3lib/Makefile
+++ b/audio/id3lib/Makefile
@@ -22,16 +22,22 @@ INSTALLS_SHLIB= yes
CPPFLAGS= -I${LOCALBASE}/include
LDFLAGS= -L${LOCALBASE}/lib
-.if ${CC} == cc || ${CC} == gcc
+CC_BASENAME= ${CC:T}
+# Should run ${CC} -v and check the output instead
+.if ${CC_BASENAME} == cc || ${CC_BASENAME} == gcc
COMPILER?= gcc
+STLPORT_PORT?= devel/stlport
+.elif ${CC_BASENAME} == icc
+COMPILER?= icc
+STLPORT_PORT?= devel/stlport-icc
.else
-COMPILER?= ${CC}
+STLPORT_PORT?= # empty
.endif
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500000
-RUN_DEPENDS= ${LOCALBASE}/lib/libstlport_${COMPILER}.so:${PORTSDIR}/devel/stlport${COMPILER:C/^/-/:S/-gcc//}
+.if ${OSVERSION} >= 500000 && !empty(STLPORT_PORT)
+RUN_DEPENDS= ${LOCALBASE}/lib/libstlport_${COMPILER}.so:${PORTSDIR}/${STLPORT_PORT}
BUILD_DEPENDS:= ${RUN_DEPENDS}
LDFLAGS+= -lstlport_${COMPILER}