[kde-freebsd] [SVN Commit] branches/qt-5.0/QT/Mk
Alberto Villa
avilla at FreeBSD.org
Fri Nov 23 00:54:37 UTC 2012
SVN commit 8723 by avilla:
- Allow PREFIX to be overwritten on command line (as in bsd.kde4.mk).
- Allow PKGNAMEPREFIX to be redefined in ports.
- Automatically define EXTRA_PATCHES (redefinable in ports) when
QT_DIST is defined.
- Make DISTINFO_FILE relative to ${.CURDIR}.
- Set Qt CONFIGURE_ARGS back to PREFIX instead of QT_PREFIX.
- Define only a generic examplesdir for Qt 5, as there is no
difference between examples and demos.
- Kill QTCFGLIBS and QTCPPFLAGS, remnants of Qt 3 (I've already
checked the ports tree and it is fine).
- Add QMAKE_LFLAGS (equal to LDFLAGS) to QMAKEFLAGS.
- Start generalising _USE_QT4_ALL renaming it to _USE_QT_ALL and
creating _USE_QT*_ONLY lists.
- Kill complicated, slow and buggy QMAKE_COMPILER-related code. It
must be moved to QMake ports, as the Qt distribution should be built
using the compiler selected for QMake. qmake5 has this ready and
working (I've built QMake with Clang and now all other Qt 5 ports
automatically use it), qmake4 will come later. As such, QMAKESPEC
defaults to */default (which is a symlink made by QMake ports).
- Add pre- and post-configure targets when QT_DIST is "base". They
populate the mkspecs/ and bin/ directories, and run QMake in
BUILD_WRKSRC to complete the configure stage (so that we do not
spend time creating useless Makefiles for the whole tree). They'll
likely need some tuning as long as the porting moves forward.
I've tried to automate as most stuff as possible without reducing port
Makefiles to 3-lines long obscure files (as per and old makc@'s
suggestion). Something will surely need to be changed; I've started
the work almost from scratch, after studying Qt 4 ports and Qt 5 build
system. By the way, can anyone suggest a better name than ${_QT_NAME}?
Qt 4 is broken in so many ways right now; I have no plan to fix it
until bsd.qt.mk becomes more stable. The required changes will be
pretty small, as I don't plan to backport big stuff to Qt 4 (look for
_QT_VERSION checks), but some improvements can be added.
Now, since I didn't comment on the first commit, here follows a log
for it.
- Add support for USE_QT5 to bsd.port.mk.
- Update MASTER_SITE_QT to support Qt 5; old mirrors were removed
because they weren't up-to-date; new mirrors are welcome.
- Start reordering bsd.qt.mk to make it easier, with important stuff
at the top.
- Add QT5_VERSION, _QT_VERSION with the currently selected Qt version,
and _QT_NAME to hold the "qt*" string; a better name for _QT_NAME is
welcome. Version checks are supposed to be made on _QT_VERSION:M4*.
- Automatically define QT_NONSTANDARD when QT_DIST is set (I still
need to verify that this is OK with Qt 4, I expect it to be with Qt
5).
- Define PREFIX=${QT_PREFIX} (we weren't doing this!).
- Automatically define PKGNAMEPREFIX when QT_BASE is defined.
- Use QT_DIST to select the correct tarball for Qt 5 (e.g.,
QT_DIST=base). Current plan is to save all the sums into
devel/qt5/distinfo, but this is low priority at the moment.
- Split Qt 4-only CONFIGURE_ARGS; -fast was moved there as Qt 5 build
system is slightly different. Other dependency-related flags are
discussed later. Debug flags behaviour was not investigated yet.
- Set QMAKESPEC to "/default" (a symlink).
- Remove QMAKE_CXX and related from QMAKEFLAGS; they must be passed
via mkspecs (as noted in dozens of comments in the file :).
CFLAGS and similar still belong here instead.
Since I plan to remove QT*_OPTIONS from Qt 5, dependencies are
currently cut to the minimum (that's why I removed the -system-* flags
from CONFIGURE_ARGS). I'll think to a solution for qconfig.(h|pri)
when I'll have some ports to use as examples.
M +212 -194 bsd.qt.mk
More information about the kde-freebsd
mailing list