- Use another way to avoid hardcoded QMAKE_CC/QMAKE_CXX

previous patch's logic allows to use any ports compile, but fails with
    base gcc when configuration script uses ${CC}="" by default
This commit is contained in:
Dima Panov 2012-06-12 11:55:49 +00:00
parent 1b3c227120
commit dfcb635d4b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=299105
2 changed files with 13 additions and 8 deletions

View file

@ -6,7 +6,7 @@
# $FreeBSD$
PORTNAME= qmake
PORTREVISION= 1
PORTREVISION= 2
DISTVERSION= ${QT4_VERSION}
CATEGORIES= devel
PKGNAMEPREFIX= qt4-
@ -54,13 +54,14 @@ post-patch:
@${REINPLACE_CMD} -e 's|@QMAKE_QTOBJS@||g' ${WRKSRC}/Makefile.unix
# FIXME: This is ugly
@${RM} ${WRKSRC}/../mkspecs/common/*.orig
@${RM} ${WRKSRC}/../mkspecs/freebsd-g++/*.orig
@${RM} ${WRKSRC}/../mkspecs/freebsd-g++46/*.orig
# Add mkspec for clang
@${CP} -PpR ${WRKSRC}/../mkspecs/freebsd-g++46 ${WRKSRC}/../mkspecs/freebsd-clang
@${REINPLACE_CMD} -e 's|g++-unix.conf|clang.conf|g' \
-e 's|freebsd-g++|freebsd-clang|g' \
-e 's|freebsd-g++46|freebsd-clang|g' \
-e 's|gcc46|clang|g' \
-e 's|g++46|clang++|g' \
${WRKSRC}/../mkspecs/freebsd-clang/qmake.conf

View file

@ -1,8 +1,13 @@
--- ../mkspecs/freebsd-g++/qmake.conf.old 2011-09-17 01:02:43.000000000 -0300
+++ ../mkspecs/freebsd-g++/qmake.conf 2011-09-17 00:23:09.000000000 -0300
@@ -13,8 +13,8 @@
@@ -12,9 +12,13 @@
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+QMAKE_CC = gcc
+
+QMAKE_CXX = g++
+
# Addon software goes into /usr/local on the BSDs, by default we will look there
-QMAKE_INCDIR = /usr/local/include
-QMAKE_LIBDIR = /usr/local/lib
@ -26,20 +31,19 @@
QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS]
--- ../mkspecs/common/g++-base.conf.old 2012-04-27 06:45:52.000000000 +1100
+++ ../mkspecs/common/g++-base.conf 2012-06-07 22:39:16.000000000 +1100
@@ -8,14 +8,14 @@
@@ -8,15 +8,11 @@
# you can use the manual test in tests/manual/mkspecs.
#
-QMAKE_CC = gcc
+QMAKE_CC ?= gcc
-
QMAKE_LINK_C = $$QMAKE_CC
QMAKE_LINK_C_SHLIB = $$QMAKE_CC
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g
-QMAKE_CXX = g++
+QMAKE_CXX ?= g++
-
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_SHLIB = $$QMAKE_CXX