OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Michael Schloh
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   28-Aug-2003 19:02:00
  Branch: HEAD                             Handle: 2003082818015900

  Modified files:
    openpkg-src/qt          qt.spec

  Log:
    Fully butcher this qt package to be even more flexible at no extra cost. Add
    back advanced X11 options (now possible to detect at link time because of
    pkg-config file), configure for tools, dynamic library support, and pthread
    support conditionally (see options), make a separate directory for dynamic
    libraries and add a build search path to it, and build plugins to get
    features like the wizard in the tools. I'm not sure if we need to store just
    lib/*.prl files, or if somewhere libtool needs to find the lib/*.la files
    also?

  Summary:
    Revision    Changes     Path
    1.79        +77 -20     openpkg-src/qt/qt.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/qt/qt.spec
  ============================================================================
  $ cvs diff -u -r1.78 -r1.79 qt.spec
  --- openpkg-src/qt/qt.spec    27 Aug 2003 16:17:10 -0000      1.78
  +++ openpkg-src/qt/qt.spec    28 Aug 2003 17:01:59 -0000      1.79
  @@ -33,11 +33,14 @@
   Group:        XWindow
   License:      GPL
   Version:      3.2.1
  -Release:      20030827
  +Release:      20030828
   
   #   package options
   %option       with_pgsql    no
   %option       with_mysql    no
  +%option       with_tools    no
  +%option       with_shared   no
  +%option       with_threads  yes
   
   #   list of sources
   Source0:      
ftp://ftp.planetmirror.com.au/pub/trolltech/qt/source/qt-x11-free-%{version}.tar.bz2
  @@ -81,7 +84,11 @@
         echo "So be prepared and patient, please... ;-)"
       ) | %{l_rpmtool} msg -b -t notice
   
  +    #   set HOME to a writable directory for qsettings
  +    #   and set QTDIR to just the source tree directory
  +    export HOME=`pwd`
       export QTDIR=`pwd`
  +
       case "%{l_target}" in
           *-freebsd* ) oscomp="freebsd-g++"
                        %{l_shtool} subst \
  @@ -96,6 +103,11 @@
           * ) echo "platform %{l_target} not supported" 2>&1; exit 1 ;;
       esac
   
  +    #   put in proper search paths for dynamic libraries
  +    rflags=`echo $LDFLAGS | %{l_shtool} subst \
  +        -e 's;%{l_prefix}/lib;%{l_prefix}/lib/qtdyn;g' \
  +        -e 's;-L;-R;g'`
  +
       #   special trolltech configuration
       CC="%{l_cc}" \
       CXX="%{l_cxx}" \
  @@ -114,18 +126,33 @@
           -prefix %{l_prefix} \
           -docdir %{l_prefix}/share/qt/doc \
           -datadir %{l_prefix}/share/qt/data \
  +        -plugindir %{l_prefix}/share/qt/plugins \
  +        -translationdir %{l_prefix}/share/qt/translations \
  +        -sysconfdir %{l_prefix}/etc/qt \
  +%if "%{with_shared}" == "yes"
  +        -release -static -shared -R$rflags -stl -sm \
  +%else
           -release -static -stl -sm \
  +%endif
           -qt-zlib -qt-libpng -qt-libjpeg -qt-libmng -qt-gif \
  -        -no-nis -no-cups -no-nas-sound -no-xinerama \
  -        -no-xrender -no-xft -no-tablet -no-xkb \
           -no-thread
   
  -    #   set $HOME to a writable directory for qsettings
  -    HOME=$PWD
       %{l_make} %{l_mflags -O} \
           MAKE="%{l_make} %{l_mflags -O}" \
  -        symlinks src-qmake src-moc sub-src sub-tools
  +        LD_LIBRARY_PATH=$QTDIR/lib \
  +%if "%{with_tools}" == "yes"
  +        symlinks src-qmake src-moc sub-src sub-plugins sub-tools
  +%else
  +        symlinks src-qmake src-moc sub-src sub-plugins
  +    ( cd tools/designer
  +      %{l_make} %{l_mflags -O} \
  +          MAKE="%{l_make} %{l_mflags -O}" \
  +          LD_LIBRARY_PATH=$QTDIR/lib \
  +          sub-uic
  +    ) || exit $?
  +%endif
   
  +%if "%{with_threads}" == "yes"
       #   generate the multithreaded library definitions also
       mv lib/qt.pc .
   
  @@ -147,16 +174,32 @@
           -prefix %{l_prefix} \
           -docdir %{l_prefix}/share/qt/doc \
           -datadir %{l_prefix}/share/qt/data \
  +        -plugindir %{l_prefix}/share/qt/plugins \
  +        -translationdir %{l_prefix}/share/qt/translations \
  +        -sysconfdir %{l_prefix}/etc/qt \
  +%if "%{with_shared}" == "yes"
  +        -release -static -shared -R$rflags -stl -sm \
  +%else
           -release -static -stl -sm \
  +%endif
           -qt-zlib -qt-libpng -qt-libjpeg -qt-libmng -qt-gif \
  -        -no-nis -no-cups -no-nas-sound -no-xinerama \
  -        -no-xrender -no-xft -no-tablet -no-xkb \
           -thread
   
       #   make our targets a second time to get threaded libs, too
       %{l_make} %{l_mflags -O} \
           MAKE="%{l_make} %{l_mflags -O}" \
  -        symlinks src-qmake src-moc sub-src sub-tools
  +        LD_LIBRARY_PATH=$QTDIR/lib \
  +%if "%{with_tools}" == "yes"
  +        symlinks src-qmake src-moc sub-src sub-plugins sub-tools
  +%else
  +        symlinks src-qmake src-moc sub-src sub-plugins
  +    ( cd tools/designer
  +      %{l_make} %{l_mflags -O} \
  +          MAKE="%{l_make} %{l_mflags -O}" \
  +          LD_LIBRARY_PATH=$QTDIR/lib \
  +          sub-uic
  +    ) || exit $?
  +%endif
   
       #   patch and prepare pkg-config (.pc) files
       mv qt.pc lib
  @@ -164,6 +207,7 @@
           -e 's;[ \t]*$;;g' \
           -e 's;\(Libs.*$\);\1 -pthread;g' \
           lib/qt-mt.pc
  +%endif
   
   %install
       rm -rf $RPM_BUILD_ROOT
  @@ -171,20 +215,27 @@
       #   make directory structure
       %{l_shtool} mkdir -f -p -m 755 \
           $RPM_BUILD_ROOT%{l_prefix}/bin \
  -        $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig \
  -        $RPM_BUILD_ROOT%{l_prefix}/include/qt/private \
  -        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  -        $RPM_BUILD_ROOT%{l_prefix}/man/man3 \
  -        $RPM_BUILD_ROOT%{l_prefix}/share/qt/doc/html \
  +%if "%{with_shared}" == "yes"
  +        $RPM_BUILD_ROOT%{l_prefix}/lib/qtdyn \
  +%endif
  +%if "%{with_tools}" == "yes"
           $RPM_BUILD_ROOT%{l_prefix}/share/qt/templates \
           $RPM_BUILD_ROOT%{l_prefix}/share/qt/phrasebooks \
  -        $RPM_BUILD_ROOT%{l_prefix}/share/qt/images
  +        $RPM_BUILD_ROOT%{l_prefix}/share/qt/images \
  +%endif
  +        $RPM_BUILD_ROOT%{l_prefix}/share/qt/doc/html \
  +        $RPM_BUILD_ROOT%{l_prefix}/include/qt/private \
  +        $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
  +        $RPM_BUILD_ROOT%{l_prefix}/man/man3
   
       #   copy binaries, headers, and then libraries to their target
       %{l_shtool} install -c -s -m 755 \
           bin/qmake bin/moc bin/uic \
  +%if "%{with_tools}" == "yes"
           bin/linguist bin/lrelease bin/lupdate \
           bin/assistant bin/qtconfig bin/designer \
  +%endif
           $RPM_BUILD_ROOT%{l_prefix}/bin/
   
       #   copy mkspecs directory for later portable use of qmake
  @@ -202,21 +253,27 @@
       %{l_shtool} install -c -m 644 \
           include/private/*.h $RPM_BUILD_ROOT%{l_prefix}/include/qt/private/
       %{l_shtool} install -c -m 644 \
  -        doc/html/* $RPM_BUILD_ROOT%{l_prefix}/share/qt/doc/html/
  +        lib/*.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
  +    %{l_shtool} install -c -m 644 \
  +        lib/*.a lib/*.prl $RPM_BUILD_ROOT%{l_prefix}/lib/
  +%if "%{with_shared}" == "yes"
  +    %{l_tar} cf - lib/*.so* lib/*.prl | %{l_tar} xf - \
  +        -C $RPM_BUILD_ROOT%{l_prefix}/lib/qtdyn/
  +%endif
  +%if "%{with_tools}" == "yes"
       %{l_shtool} install -c -m 644 \
           tools/designer/templates/*.ui $RPM_BUILD_ROOT%{l_prefix}/share/qt/templates/
       %{l_shtool} install -c -m 644 \
           tools/linguist/phrasebooks/*.qph 
$RPM_BUILD_ROOT%{l_prefix}/share/qt/phrasebooks/
       %{l_shtool} install -c -m 644 \
           tools/designer/designer/images/* $RPM_BUILD_ROOT%{l_prefix}/share/qt/images/
  -    %{l_shtool} install -c -m 644 \
  -        lib/*.a lib/*.prl $RPM_BUILD_ROOT%{l_prefix}/lib/
  -    %{l_shtool} install -c -m 644 \
  -        lib/*.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
  +%endif
       %{l_shtool} install -c -m 644 \
           doc/man/man3/*.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
       %{l_shtool} install -c -m 644 \
           doc/man/man1/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
  +    %{l_shtool} install -c -m 644 \
  +        doc/html/* $RPM_BUILD_ROOT%{l_prefix}/share/qt/doc/html/
   
       #   determine installation files
       %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to