On Sun, Nov 05, 2006 at 10:20:59AM +0100, Marc Espie wrote:
> On Sun, Nov 05, 2006 at 12:08:05AM -0500, Carlos Manuel Duclos Vergara wrote:
> > Hi all,
> > 
> > I've been trying to compile a KDE application but configure never finds
> > the qt3 lib. I used the --with-qt-includes and --with-qt-libs= pointing to
> > /usr/local/lib/qt3/{include,lib} since after a clean installation of
> > OpenBSD 4.0 I found qt3 there.
> > The first application I tried to compile was KMyMoney, but I never passed
> > that step. After a while I decided to try with another application just to
> > make sure that the problem reproduces with it. I tried to compile KDevelop
> > and the result is the same.
> > Since OpenBSD includes lots of KDE applications, I'm sure that I must be
> > doing something wrong or there is some trick I don't know.
> > At this point I have double checked that I have all the required tools and
> > is still the same. My configuration:
> > - Plain OpenBSD 4.0
> > - KDE system (base, libs, sdk, koffice)
> > - qt3 included with OpenBSD 4.0
> > - autoconf 2.60
> you usually don't need this.
> > - automake 1.9
> nor this.
> > - gcc/g++: 3.3.5 (OpenBSD 4.0)
> 
> > Steps I follow:
> > 1. Unpack kmymoney2-0.8.5
> > 2. ./configure
> 
> Have a look in the ports tree at ports/x11/kde/kde.port.mk, 
> it contains all of the stuff that's necessary to configure most kde apps.
> 
> This is a design choice: OpenBSD has a clear separation between the base
> system and the rest. KDE is not part of the base system, neither is qt.
> So they are not found with configure unless you tweak it a great deal.
        not *that* bad  ->                                  ^^^^^^^^^^^
But I have to agree that it is hard to get your head around it the first
time.

Extract from my private "what I once did, but would forget about without
writing it down _somewhere_ manuals":

General hints about compiling stuff on OpenBSD

Compiling QT Applications:
--------------------------
# LOCALBASE=/usr/local

# Using ./configure
env MOC=moc3 UIC=uic3 \
./configure --with-extra-includes=${LOCALBASE}/include \
        --with-extra-libs=${LOCALBASE}/lib \
        --with-qt-includes=${LOCALBASE}/include/X11/qt3 \
        --with-qt-libraries=${LOCALBASE}/lib/qt3

# Using make
#----------------------------------- Makefile ---------------------------------#
LOCALBASE       = /usr/local
MOC                     = $(LOCALBASE)/bin/moc3-mt
UIC                     = $(LOCALBASE)/bin/uic-mt
LIBS            += -lqt-mt
#LIBS           += -lpthread
#------------------------------------------------------------------------------#

Works for a bunch of K* apps.


Also from a port I once made:
--- /home/ahb/kseg/Makefile     Sat Jun 17 11:42:22 2006
+++ /home/ahb/kseg/Makefile.patched     Sat Jun 17 10:43:16 2006
@@ -19,11 +20,11 @@
 INCPATH  = -I/usr/local/lib/qt3/mkspecs/default -I. -I$(LOCALBASE)/include 
-I$(LOCALBASE)/include/X11/qt3
 LINK     = g++
 LFLAGS   = 
-LIBS     = $(SUBLIBS) -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/qt3 
-L/usr/X11R6/lib -lz -lqt -lXext -lX11 -lm
+LIBS     = $(SUBLIBS) -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/qt3 
-L/usr/X11R6/lib -lz -lpthread -lqt-mt -lXext -lX11 -lm
 AR       = ar q
 RANLIB   = ranlib
-MOC      = $(QTDIR)/bin/moc
-UIC      = $(QTDIR)/bin/uic
+MOC      = /usr/local/bin/moc3-mt
+UIC      = /usr/local/bin/uic-mt
 QMAKE    = qmake
 TAR      = tar -cf
 GZIP     = gzip -9f


Another approch to the same port:
do-configure:
        @cd ${WRKSRC} && \
        qmake-mt -makefile \
                -spec ${MODQT_LIBDIR}/mkspecs/openbsd-g++ \
                -unix \
                "LIBS+=-L/usr/local/lib -lm -lqt-mt" \
                "PREFIX=${LOCALBASE}" \
                "INCLUDEPATH+=${MODQT_INCDIR}" \
                "UIC=${MODQT_UIC}" \
                "MOC=${MODQT_MOC}" \
                kseg.pro

Regards,
ahb

Reply via email to