GARNAME = qt GARVERSION = 3.3.8 CATEGORIES = x11 MASTER_SITES = ftp://ftp.trolltech.com/qt/source/ DISTNAME = qt-x11-free-$(GARVERSION) DISTFILES = $(DISTNAME).tar.gz # Accept the license automatically. (It's the GPL, so it's fine.) PATCHFILES = clickwrap.diff LIBDEPS = x11/xlib media/libpng media/jpeg db/mysql db/postgresql db/sqlite DESCRIPTION = Widget set and C++ utilities from Trolltech HOME_URL = http://www.trolltech.com/products/qt/ CONFIGURE_SCRIPTS = $(WORKSRC)/configure BUILD_SCRIPTS = $(WORKSRC)/Makefile INSTALL_SCRIPTS = $(WORKSRC)/Makefile-DESTDIR links # Stupid Qt (the paths given at configure time get hardcoded into the # Makefiles, and it doesn't even pretend to follow FHS). CONFIGURE_ARGS = \ -prefix $(prefix)/lib/qt \ -bindir $(prefix)/bin \ -headerdir $(prefix)/include/qt \ -libdir $(prefix)/lib \ -qt-gif \ -thread \ -no-exceptions \ -system-libpng \ -system-libjpeg \ -qt-sql-mysql \ -qt-sql-psql \ -qt-sql-sqlite worklib = $(CURDIR)/$(WORKSRC)/lib BUILD_ARGS = \ CXX='g++ -I$(prefix)/include/mysql -I$(prefix)/include/postgresql/server' \ LINK='g++ -L$(prefix)/lib/mysql -Wl,-R$(prefix)/lib/mysql' # Interesting problem: the build system doesn't like us setting # LD_LIBRARY_PATH, since then it finds the old version of the library rather # than the version it's just built when running uic. Explicitly include the # directory it sticks the library into. BUILD_ENV = LD_LIBRARY_PATH="$(worklib):$(LD_LIBRARY_PATH)" DESTDIR_INSTALL_ARGS = INSTALL_ROOT=$(packageDESTDIR) include ../../gar.mk # Don't build the tutorial or examples. # Don't use -rpath (which, as above, stops uic finding the right version of the # library). pre-build: @sed -i 's,sub-tutorial sub-examples,,g' $(WORKSRC)/Makefile @find $(WORKSRC) -name Makefile | xargs sed -r -i \ -e 's: -Wl,-rpath,[^ ]*::g' $(MAKECOOKIE) # Remove obsolete paths that crept in in older versions. pre-install: @find $(WORKSRC) -name Makefile | xargs sed -r -i \ -e 's,$(packagesdir)/qt-[^/]+,$(prefix),g' \ -e 's,/usr/X11R6/lib/libqassistantclient.prl,,g' $(MAKECOOKIE) # Some programs assume the standard layout. install-links: @ln -sf $(prefix)/bin $(packageprefix)/lib/qt/bin @ln -sf $(prefix)/include/qt $(packageprefix)/lib/qt/include @ln -sf $(prefix)/lib $(packageprefix)/lib/qt/lib $(MAKECOOKIE)