summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2011-01-12 07:07:06 +0000
committeradam <adam@pkgsrc.org>2011-01-12 07:07:06 +0000
commitf8095931bf39b0bb77b26d5eb92bf1536f01716e (patch)
tree34fbe17d140e271f142308694adea57540b75593 /x11
parentafa322ac59aac833a6d8b1f4239d5e994366e605 (diff)
downloadpkgsrc-f8095931bf39b0bb77b26d5eb92bf1536f01716e.tar.gz
* Install libphonon.
* On Mac OS X build Qt with Cocoa, but don't install as a framework.
Diffstat (limited to 'x11')
-rw-r--r--x11/qt4-libs/Makefile34
-rw-r--r--x11/qt4-libs/Makefile.common40
-rw-r--r--x11/qt4-libs/PLIST9
-rw-r--r--x11/qt4-libs/buildlink3.mk10
-rw-r--r--x11/qt4-libs/distinfo7
-rw-r--r--x11/qt4-libs/files/qmake.conf6
-rw-r--r--x11/qt4-libs/files/qmake.conf.mac98
-rw-r--r--x11/qt4-libs/options.mk6
-rw-r--r--x11/qt4-libs/patches/patch-ad20
-rw-r--r--x11/qt4-libs/patches/patch-ar21
-rw-r--r--x11/qt4-libs/patches/patch-cb28
11 files changed, 210 insertions, 69 deletions
diff --git a/x11/qt4-libs/Makefile b/x11/qt4-libs/Makefile
index 874448b190c..ea957dc4431 100644
--- a/x11/qt4-libs/Makefile
+++ b/x11/qt4-libs/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.53 2010/12/23 11:45:02 dsainty Exp $
+# $NetBSD: Makefile,v 1.54 2011/01/12 07:07:06 adam Exp $
PKG_DESTDIR_SUPPORT= user-destdir
.include "../../x11/qt4-libs/Makefile.common"
PKGNAME= qt4-libs-${QTVERSION}
-PKGREVISION= 1
+PKGREVISION= 2
COMMENT= C++ X GUI toolkit
# XXX this is to test what really gets installed when 'do-install' is disabled
@@ -39,7 +39,11 @@ INSTALLATION_DIRS+= ${QTPREFIX}/plugins/codecs
INSTALLATION_DIRS+= ${QTPREFIX}/plugins/graphicssystems
INSTALLATION_DIRS+= ${QTPREFIX}/plugins/iconengines
INSTALLATION_DIRS+= ${QTPREFIX}/plugins/imageformats
+.if ${OPSYS} == "Darwin"
+INSTALLATION_DIRS+= ${QTPREFIX}/qt_menu.nib
+.else
INSTALLATION_DIRS+= ${QTPREFIX}/plugins/inputmethods
+.endif
INSTALL_ENV+= INSTALL_ROOT=${DESTDIR}
@@ -66,7 +70,7 @@ do-install:
${MAKE_PROGRAM} install_flat_headers install_targ_headers install_class_headers
.endfor
cd ${DESTDIR}${PREFIX} && find qt4/include -type f -print > ${WRKDIR}/PLIST
-.for lib in Qt3Support QtCore QtDeclarative QtGui QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns jscore
+.for lib in Qt3Support QtCore QtDeclarative QtGui QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtWebKit QtXml QtXmlPatterns jscore phonon
${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/lib/lib${lib}.la \
${DESTDIR}${QTPREFIX}/lib/
sed -e "s:${WRKSRC}:${QTPREFIX}:g" \
@@ -101,29 +105,29 @@ do-install:
${WRKSRC}/plugins/imageformats/lib${plug}.la \
${DESTDIR}${QTPREFIX}/plugins/imageformats/
.endfor
+.if ${OPSYS} == "Darwin"
+ ${INSTALL_DATA} ${WRKSRC}/src/gui/mac/qt_menu.nib/*.nib \
+ ${DESTDIR}${QTPREFIX}/qt_menu.nib/
+.else
${LIBTOOL} --mode=install ${INSTALL_LIB} \
${WRKSRC}/plugins/inputmethods/libqimsw-multi.la \
${DESTDIR}/${QTPREFIX}/plugins/inputmethods/
-
-.if ${OPSYS} == "Darwin" && empty(MACHINE_PLATFORM:MDarwin-[567].*)
-SUBST_CLASSES+= socklen
-SUBST_MESSAGE.socklen= Correcting socklen_t.
-SUBST_STAGE.socklen= pre-configure
-SUBST_FILES.socklen= mkspecs/darwin-g++/qplatformdefs.h
-SUBST_SED.socklen= -e 's/QT_SOCKLEN_T.*/QT_SOCKLEN_T socklen_t/'
.endif
-.include "../../devel/zlib/buildlink3.mk"
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../mk/jpeg.buildlink3.mk"
+.if ${OPSYS} != "Darwin"
.include "../../graphics/glu/buildlink3.mk"
-.include "../../graphics/png/buildlink3.mk"
.include "../../x11/libSM/buildlink3.mk"
.include "../../x11/libXcursor/buildlink3.mk"
.include "../../x11/libXft/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
.include "../../x11/libXrandr/buildlink3.mk"
+.endif
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../graphics/freetype2/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/x11/qt4-libs/Makefile.common b/x11/qt4-libs/Makefile.common
index 03af685f105..60e97d7a793 100644
--- a/x11/qt4-libs/Makefile.common
+++ b/x11/qt4-libs/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.23 2011/01/01 21:39:06 adam Exp $
+# $NetBSD: Makefile.common,v 1.24 2011/01/12 07:07:06 adam Exp $
# used by x11/qt4-docs/Makefile
# used by x11/qt4-libs/Makefile
# used by x11/qt4-mng/Makefile
@@ -26,12 +26,13 @@ USE_TOOLS+= gmake
QTPREFIX= ${PREFIX}/qt4
-#CONFIGURE_ARGS+= -arch ${MACHINE_ARCH}
+CONFIGURE_ARGS+= -no-phonon-backend
CONFIGURE_ARGS+= -optimized-qmake
CONFIGURE_ARGS+= -prefix "${QTPREFIX}"
CONFIGURE_ARGS+= -qt-gif # qt4 does not write compressed GIFs
CONFIGURE_ARGS.SunOS+= -no-xrender
-CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*} ${LDFLAGS:M-Wl*:S/-Wl,//}
+CONFIGURE_ARGS+= ${CFLAGS:M-I*} ${LDFLAGS:M-L*}
+CONFIGURE_ARGS+= ${LDFLAGS:M-Wl*:S/-Wl,//:S/-syslibroot,/-sdk /}
CONFIGURE_ARGS+= -opensource -confirm-license
OPSYSVARS+= CONFIGURE_ARGS
@@ -45,6 +46,16 @@ LIBQT?= -lQtCore -lQtGui
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
MAKE_ENV+= QTDIR=${WRKSRC}
+PLIST_VARS+= mac unix
+.if ${OPSYS} == "Darwin"
+PLIST.mac= yes
+QMAKE_CONF= qmake.conf.mac
+QMAKE_RANLIB= ${RANLIB}
+.else
+PLIST.unix= yes
+QMAKE_CONF= qmake.conf
+QMAKE_RANLIB= ${TRUE}
+.endif
# avoid creating a .qt directory in the users home directory
SCRIPTS_ENV+= HOME=${WRKDIR}
@@ -75,8 +86,9 @@ SYS_LIBS= -lbind -ldb -ldl
.elif ${OPSYS} == "DragonFly"
CONFIGURE_ARGS+= -platform freebsd-g++
.elif ${OPSYS} == "Darwin"
-#CONFIGURE_ARGS+= -cocoa
-QMAKE_RANLIB= ${RANLIB}
+CONFIGURE_ARGS+= -platform macx-g++
+CONFIGURE_ARGS+= -no-dwarf2
+CONFIGURE_ARGS+= -no-framework
. if exists(/usr/lib/libresolv.dylib)
LDFLAGS+= -lresolv
. endif
@@ -84,15 +96,25 @@ LDFLAGS+= -lresolv
LDFLAGS+= -ldl
.endif
-QMAKE_RANLIB?= ${TRUE}
-
-.if ${X11_TYPE} != "native"
+.if ${OPSYS} != "Darwin" && ${X11_TYPE} != "native"
.include "../../x11/libXinerama/buildlink3.mk"
.elif !exists(${X11BASE}/lib/libXinerama.so) && \
!exists(${X11BASE}/lib/libXinerama.dylib)
CONFIGURE_ARGS+= -no-xinerama
.endif
+SUBST_CLASSES+= dnr
+SUBST_MESSAGE.dnr= Disabling debug_and_release.
+SUBST_STAGE.dnr= pre-configure
+SUBST_FILES.dnr= mkspecs/features/debug_and_release.prf
+SUBST_SED.dnr= -e 's,^,\#\#\#,'
+
+SUBST_CLASSES+= nib
+SUBST_MESSAGE.nib= Fixing nib loading on Mac OS X.
+SUBST_STAGE.nib= pre-configure
+SUBST_FILES.nib= src/gui/kernel/qapplication_mac.mm
+SUBST_VARS.nib= QTPREFIX
+
SUBST_CLASSES+= lt
SUBST_MESSAGE.lt= Enabling libtool.
SUBST_STAGE.lt= pre-configure
@@ -130,7 +152,7 @@ pre-configure:
-e 's:@PTHREAD_LIBS@:${PTHREAD_LIBS:Q}:g' \
-e 's:@COMPILER_RPATH_FLAG@:${COMPILER_RPATH_FLAG}:g' \
-e 's:@QMAKE_RANLIB@:${QMAKE_RANLIB:Q}:g' \
- ${FILESDIR}/qmake.conf > ${WRKSRC}/qmake.conf
+ ${FILESDIR}/${QMAKE_CONF} > ${WRKSRC}/qmake.conf
for dir in ${WRKSRC}/mkspecs/*; do \
cp ${WRKSRC}/qmake.conf $${dir}; \
rm -f $${dir}/*.orig; \
diff --git a/x11/qt4-libs/PLIST b/x11/qt4-libs/PLIST
index 838eb1ef2da..b901233437a 100644
--- a/x11/qt4-libs/PLIST
+++ b/x11/qt4-libs/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.15 2010/11/15 13:05:45 adam Exp $
+@comment $NetBSD: PLIST,v 1.16 2011/01/12 07:07:06 adam Exp $
lib/pkgconfig/Qt3Support.pc
lib/pkgconfig/QtCore.pc
lib/pkgconfig/QtDeclarative.pc
@@ -15,6 +15,7 @@ lib/pkgconfig/QtWebKit.pc
lib/pkgconfig/QtXml.pc
lib/pkgconfig/QtXmlPatterns.pc
lib/pkgconfig/jscore.pc
+lib/pkgconfig/phonon.pc
qt4/bin/moc
qt4/bin/rcc
qt4/bin/uic
@@ -39,6 +40,7 @@ qt4/lib/libQtWebKit.la
qt4/lib/libQtXml.la
qt4/lib/libQtXmlPatterns.la
qt4/lib/libjscore.la
+qt4/lib/libphonon.la
qt4/plugins/accessible/libqtaccessiblecompatwidgets.la
qt4/plugins/accessible/libqtaccessiblewidgets.la
qt4/plugins/bearer/libqgenericbearer.la
@@ -53,5 +55,8 @@ qt4/plugins/imageformats/libqgif.la
qt4/plugins/imageformats/libqico.la
qt4/plugins/imageformats/libqjpeg.la
qt4/plugins/imageformats/libqsvg.la
-qt4/plugins/inputmethods/libqimsw-multi.la
+${PLIST.unix}qt4/plugins/inputmethods/libqimsw-multi.la
+${PLIST.mac}qt4/qt_menu.nib/classes.nib
+${PLIST.mac}qt4/qt_menu.nib/info.nib
+${PLIST.mac}qt4/qt_menu.nib/keyedobjects.nib
qt4/q3porting.xml
diff --git a/x11/qt4-libs/buildlink3.mk b/x11/qt4-libs/buildlink3.mk
index 3a564182e83..9bf208c2db9 100644
--- a/x11/qt4-libs/buildlink3.mk
+++ b/x11/qt4-libs/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.22 2010/12/23 11:45:02 dsainty Exp $
+# $NetBSD: buildlink3.mk,v 1.23 2011/01/12 07:07:06 adam Exp $
BUILDLINK_TREE+= qt4-libs
@@ -20,16 +20,18 @@ PTHREAD_OPTS+= require
.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
-.include "../../graphics/glu/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
+.if ${OPSYS} != "Darwin"
+.include "../../graphics/glu/buildlink3.mk"
.include "../../x11/libSM/buildlink3.mk"
.include "../../x11/libXcursor/buildlink3.mk"
.include "../../x11/libXft/buildlink3.mk"
.include "../../x11/libXmu/buildlink3.mk"
.include "../../x11/libXrandr/buildlink3.mk"
-.if ${X11_TYPE} == "modular"
-.include "../../x11/libXinerama/buildlink3.mk"
+. if ${X11_TYPE} == "modular"
+. include "../../x11/libXinerama/buildlink3.mk"
+. endif
.endif
.include "../../mk/pthread.buildlink3.mk"
diff --git a/x11/qt4-libs/distinfo b/x11/qt4-libs/distinfo
index e7b943757cf..ba886ec116a 100644
--- a/x11/qt4-libs/distinfo
+++ b/x11/qt4-libs/distinfo
@@ -1,11 +1,11 @@
-$NetBSD: distinfo,v 1.49 2011/01/01 21:39:06 adam Exp $
+$NetBSD: distinfo,v 1.50 2011/01/12 07:07:06 adam Exp $
SHA1 (qt-everywhere-opensource-src-4.7.1.tar.gz) = fcf764d39d982c7f84703821582bd10c3192e341
RMD160 (qt-everywhere-opensource-src-4.7.1.tar.gz) = de6998948eb9f51a9193b9020ba80cfd52d50899
Size (qt-everywhere-opensource-src-4.7.1.tar.gz) = 211768512 bytes
SHA1 (patch-aa) = 70cf085b3f5ac32e8d2e7312eb998e08500f30f1
SHA1 (patch-ac) = 078ddafefc719f248740f40e2063dae07cd601e5
-SHA1 (patch-ad) = df3a50533fdb6d71ecb83cb3d6fef9a9195ef3e6
+SHA1 (patch-ad) = 42ab1fa5f0dd54c3cdc898c1a95c399414ca33ea
SHA1 (patch-ae) = c3956f4453a0c365b683692ef86f25be6af9f744
SHA1 (patch-af) = 54bb375f7c1a43e7bf3f9528e31000a1f292f7d3
SHA1 (patch-ag) = ae652f320072670ef4125b11e002c4aa2d87ce89
@@ -18,7 +18,7 @@ SHA1 (patch-an) = 8aa6ceffb9acab4771d22b3184a1360227a81409
SHA1 (patch-ao) = becfc697d7ae337327a416cfcea2ca8952fe1ed4
SHA1 (patch-ap) = 86a2f5cce47607c8c453c63c6213d5efb48c8569
SHA1 (patch-aq) = ec88f8b47d77297cc9a06e97a0cfce5297074c68
-SHA1 (patch-ar) = 5bf166c9b7d71bf5e6c3839f804c865f5221879a
+SHA1 (patch-ar) = ba839210b42532b1797604722442841e43acbae1
SHA1 (patch-as) = b0962c535fc2e8da08bb78b9ebcb5cd678565058
SHA1 (patch-at) = f9b090ead20dd1b664484237ac5777fdd03ea1ed
SHA1 (patch-au) = 397a18f84299026e21aee0079784f56698fc9c6b
@@ -34,3 +34,4 @@ SHA1 (patch-bd) = 6bb0a67cb087d75761338a5abe567b9fa2b5471d
SHA1 (patch-be) = e5555a6c08bfb98dd69543cec75771999ee37b13
SHA1 (patch-bf) = 7c5810021580a5c4faf8c890b2c02a373b167b04
SHA1 (patch-ca) = 8b69cb6201f624f43df7d766ff1967253bb22430
+SHA1 (patch-cb) = 4817f5b266f75e93918517c219a1f4bf74b989b3
diff --git a/x11/qt4-libs/files/qmake.conf b/x11/qt4-libs/files/qmake.conf
index 9f5f1d8f16c..f0624e40c0f 100644
--- a/x11/qt4-libs/files/qmake.conf
+++ b/x11/qt4-libs/files/qmake.conf
@@ -1,8 +1,6 @@
-# $NetBSD: qmake.conf,v 1.4 2010/11/15 13:05:45 adam Exp $
-# $Id: qmake.conf,v 1.4 2010/11/15 13:05:45 adam Exp $
-#
-# qmake configuration for pkgsrc
+# $NetBSD: qmake.conf,v 1.5 2011/01/12 07:07:07 adam Exp $
#
+# qmake configuration for PkgSrc
MAKEFILE_GENERATOR = UNIX
TARGET_PLATFORM = unix
diff --git a/x11/qt4-libs/files/qmake.conf.mac b/x11/qt4-libs/files/qmake.conf.mac
new file mode 100644
index 00000000000..88e2f651de3
--- /dev/null
+++ b/x11/qt4-libs/files/qmake.conf.mac
@@ -0,0 +1,98 @@
+# $NetBSD: qmake.conf.mac,v 1.1 2011/01/12 07:07:07 adam Exp $
+#
+# qmake configuration for PkgSrc on Mac OS X
+
+MAKEFILE_GENERATOR = UNIX
+TARGET_PLATFORM = macx
+TEMPLATE = app
+CONFIG += qt warn_on release link_prl incremental global_init_link_order lib_version_first plugin_no_soname
+QT += core gui
+
+QMAKE_COMPILER_DEFINES = __APPLE__ __GNUC__
+
+QMAKE_CC = @CC@
+QMAKE_LEX = @LEX@
+QMAKE_LEXFLAGS =
+QMAKE_YACC = @YACC@
+QMAKE_YACCFLAGS = -d
+QMAKE_CFLAGS = @CFLAGS@
+QMAKE_CFLAGS_DEPS = -M
+QMAKE_CFLAGS_WARN_ON =
+QMAKE_CFLAGS_WARN_OFF =
+QMAKE_CFLAGS_RELEASE =
+QMAKE_CFLAGS_DEBUG = -g
+QMAKE_CFLAGS_SHLIB = -fPIC
+QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
+QMAKE_CFLAGS_THREAD = -D_REENTRANT
+
+QMAKE_CXX = @CXX@
+QMAKE_CXXFLAGS = @CXXFLAGS@ -DQ_TRAILING_DIR_SEP
+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
+QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
+QMAKE_CXXFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_STATIC_LIB
+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
+
+QMAKE_INCDIR = @LOCALBASE@/include
+QMAKE_LIBDIR = @LOCALBASE@/lib
+QMAKE_INCDIR_QT = $(QTDIR)/include
+QMAKE_LIBDIR_QT = $(QTDIR)/lib
+QMAKE_INCDIR_OPENGL = /System/Library/Frameworks/OpenGL.framework/Headers \
+ /System/Library/Frameworks/AGL.framework/Headers
+
+QMAKE_LINK = @CXX@
+QMAKE_LINK_SHLIB = @CXX@
+QMAKE_LINK_C = @CC@
+QMAKE_LINK_C_SHLIB = @CC@
+QMAKE_LINK_SHLIB_CMD = $$QMAKE_LINK_SHLIB $$QMAKE_LFLAGS_SHLIB $(LFLAGS) $$QMAKE_LFLAGS -o $(TARGETD) $(OBJECTS) $(OBJMOC) $(LIBS)
+QMAKE_LFLAGS = $(LDFLAGS) -L$(QTDIR)/lib
+QMAKE_LFLAGS_RELEASE =
+QMAKE_LFLAGS_DEBUG =
+QMAKE_LFLAGS_SHLIB = -single_module -dynamiclib
+QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
+QMAKE_LFLAGS_SONAME = -install_name$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_THREAD = @PTHREAD_LDFLAGS@
+QMAKE_LFLAGS_NOUNDEF =
+QMAKE_LFLAGS_RPATH = @COMPILER_RPATH_FLAG@
+QMAKE_LFLAGS_INCREMENTAL= -undefined suppress -flat_namespace
+QMAKE_LFLAGS_VERSION = -current_version$${LITERAL_WHITESPACE}
+QMAKE_LFLAGS_COMPAT_VERSION=-compatibility_version$${LITERAL_WHITESPACE}
+# -all_load requred to make Objective-C categories work in static builds.
+QMAKE_LFLAGS_STATIC_LIB = -all_load
+
+QMAKE_FIX_RPATH = install_name_tool -id
+QMAKE_EXTENSION_SHLIB = dylib
+
+QMAKE_LIBS =
+QMAKE_LIBS_DYNLOAD =
+QMAKE_LIBS_THREAD =
+QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
+QMAKE_LIBS_OPENGL_QT = $$QMAKE_LIBS_OPENGL
+
+QMAKE_MOC = $(QTDIR)/bin/moc
+QMAKE_UIC = $(QTDIR)/bin/uic
+QMAKE_UIC3 = $(QTDIR)/bin/uic3
+QMAKE_RCC = $(QTDIR)/bin/rcc
+
+QMAKE_AR = @AR@ cq
+#QMAKE_OBJCOPY = objcopy
+QMAKE_RANLIB = @QMAKE_RANLIB@
+
+QMAKE_TAR = tar -cf
+QMAKE_GZIP = gzip -9f
+
+QMAKE_COPY = cp -f
+QMAKE_COPY_FILE = $$QMAKE_COPY
+QMAKE_COPY_DIR = $$QMAKE_COPY -R
+QMAKE_MOVE = mv -f
+QMAKE_DEL_FILE = rm -f
+QMAKE_DEL_DIR = rmdir
+QMAKE_CHK_DIR_EXISTS = test -d
+QMAKE_MKDIR = @MKDIR@
+include(../common/unix.conf)
+load(qt_config)
diff --git a/x11/qt4-libs/options.mk b/x11/qt4-libs/options.mk
index 9654c7b3dfd..4905c300fc7 100644
--- a/x11/qt4-libs/options.mk
+++ b/x11/qt4-libs/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.4 2009/10/18 16:34:34 ahoka Exp $
+# $NetBSD: options.mk,v 1.5 2011/01/12 07:07:06 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.qt4
PKG_SUPPORTED_OPTIONS= cups debug gtk2
@@ -23,6 +23,8 @@ CONFIGURE_ARGS+= -no-gtkstyle
.if !empty(PKG_OPTIONS:Mdebug)
CC+= -ggdb
CXX+= -ggdb
-CONFIGURE_ARGS+= --debug
+CONFIGURE_ARGS+= -debug
INSTALL_UNSTRIPPED= yes
+.else
+CONFIGURE_ARGS+= -no-debug
.endif
diff --git a/x11/qt4-libs/patches/patch-ad b/x11/qt4-libs/patches/patch-ad
index 73e413941f9..c3f468a7863 100644
--- a/x11/qt4-libs/patches/patch-ad
+++ b/x11/qt4-libs/patches/patch-ad
@@ -1,4 +1,4 @@
-$NetBSD: patch-ad,v 1.11 2010/11/15 13:05:45 adam Exp $
+$NetBSD: patch-ad,v 1.12 2011/01/12 07:07:07 adam Exp $
--- src/corelib/global/qglobal.h.orig 2010-09-10 09:05:25.000000000 +0000
+++ src/corelib/global/qglobal.h
@@ -20,21 +20,3 @@ $NetBSD: patch-ad,v 1.11 2010/11/15 13:05:45 adam Exp $
#elif defined(__OpenBSD__)
# define Q_OS_OPENBSD
# define Q_OS_BSD4
-@@ -266,8 +270,6 @@ namespace QT_NAMESPACE {}
- #endif
-
- #if defined(Q_OS_DARWIN)
--# define Q_OS_MAC /* Q_OS_MAC is mostly for compatibility, but also more clear */
--# define Q_OS_MACX /* Q_OS_MACX is only for compatibility.*/
- # if defined(Q_OS_DARWIN64)
- # define Q_OS_MAC64
- # elif defined(Q_OS_DARWIN32)
-@@ -804,8 +806,6 @@ namespace QT_NAMESPACE {}
- # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
- #elif defined(Q_OS_UNIX)
- # if defined(Q_OS_MAC) && !defined(__USE_WS_X11__) && !defined(Q_WS_QWS)
--# define Q_WS_MAC
--# define Q_WS_MACX
- # if defined(Q_OS_MAC64)
- # define Q_WS_MAC64
- # elif defined(Q_OS_MAC32)
diff --git a/x11/qt4-libs/patches/patch-ar b/x11/qt4-libs/patches/patch-ar
index e2b25135505..4cbd7a569cf 100644
--- a/x11/qt4-libs/patches/patch-ar
+++ b/x11/qt4-libs/patches/patch-ar
@@ -1,13 +1,12 @@
-$NetBSD: patch-ar,v 1.5 2010/01/29 18:19:09 adam Exp $
+$NetBSD: patch-ar,v 1.6 2011/01/12 07:07:07 adam Exp $
---- src/corelib/global/qglobal.h.orig 2010-01-27 13:03:02.000000000 +0000
-+++ src/corelib/global/qglobal.h
-@@ -177,7 +177,7 @@ namespace QT_NAMESPACE {}
- */
+--- mkspecs/features/default_post.prf.orig 2010-12-29 20:37:11.000000000 +0000
++++ mkspecs/features/default_post.prf
+@@ -12,7 +12,6 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_R
- #if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
--# define Q_OS_DARWIN
-+/* # define Q_OS_DARWIN *//* Else it'll try to use MacOS, no X, stuff - HF */
- # define Q_OS_BSD4
- # ifdef __LP64__
- # define Q_OS_DARWIN64
+ CONFIG(debug, debug|release):load(debug)
+ else:load(release)
+-debug_and_release:load(debug_and_release)
+ incredibuild_xge {
+ CONFIG -= incredibuild_xge
+ CONFIG = incredibuild_xge $$CONFIG
diff --git a/x11/qt4-libs/patches/patch-cb b/x11/qt4-libs/patches/patch-cb
new file mode 100644
index 00000000000..66240795029
--- /dev/null
+++ b/x11/qt4-libs/patches/patch-cb
@@ -0,0 +1,28 @@
+$NetBSD: patch-cb,v 1.3 2011/01/12 07:07:07 adam Exp $
+
+--- src/gui/kernel/qapplication_mac.mm.orig 2010-12-30 14:07:53.000000000 +0000
++++ src/gui/kernel/qapplication_mac.mm
+@@ -1244,6 +1244,7 @@ void qt_init(QApplicationPrivate *priv,
+ #ifdef QT_MAC_USE_COCOA
+ NSApplication *cocoaApp = [QNSApplication sharedApplication];
+ QMacCocoaAutoReleasePool pool;
++ NSNib *qtNib;
+ NSObject *oldDelegate = [cocoaApp delegate];
+ QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) *newDelegate = [QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate];
+ Q_ASSERT(newDelegate);
+@@ -1254,12 +1255,14 @@ void qt_init(QApplicationPrivate *priv,
+ [cocoaApp setDelegate:newDelegate];
+
+ QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *qtMenuLoader = [[QT_MANGLE_NAMESPACE(QCocoaMenuLoader) alloc] init];
+- if ([NSBundle loadNibNamed:@"qt_menu" owner:qtMenuLoader] == false) {
++ qtNib = [[NSNib alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"@QTPREFIX@/qt_menu.nib"]];
++ if ([qtNib instantiateNibWithOwner:qtMenuLoader topLevelObjects:nil] == false) {
+ qFatal("Qt internal error: qt_menu.nib could not be loaded. The .nib file"
+ " should be placed in QtGui.framework/Versions/Current/Resources/ "
+ " or in the resources directory of your application bundle.");
+ }
+
++ [qtNib release];
+ [cocoaApp setMenu:[qtMenuLoader menu]];
+ [newDelegate setMenuLoader:qtMenuLoader];
+ [qtMenuLoader release];