Kaynağa Gözat

Revamp configuration and add freetype and other options.

Ralf S. Engelschall 24 yıl önce
ebeveyn
işleme
04ae9b8d4c
1 değiştirilmiş dosya ile 53 ekleme ve 21 silme
  1. 53 21
      qt/qt.spec

+ 53 - 21
qt/qt.spec

@@ -23,6 +23,14 @@
 ##  SUCH DAMAGE.
 ##
 
+#   package option, soup denotes almost all GUI features
+%ifndef       with_freetype
+%define       with_freetype no
+%endif
+%ifndef       with_other
+%define       with_other no
+%endif
+
 #   package information
 Name:         qt
 Summary:      The Qt Toolkit
@@ -33,7 +41,7 @@ Distribution: OpenPKG [EXP]
 Group:        X11
 License:      GPL
 Version:      3.0.4
-Release:      20020529
+Release:      20020606
 
 #   list of sources
 Source0:      ftp://ftp.trolltech.com/qt/source/qt-x11-free-%{version}.tar.gz
@@ -41,22 +49,28 @@ Source0:      ftp://ftp.trolltech.com/qt/source/qt-x11-free-%{version}.tar.gz
 #   build information
 Prefix:       %{l_prefix}
 BuildRoot:    %{l_buildroot}
-BuildPreReq:  OpenPKG, openpkg >= 20020206, X11, jpeg, png, zlib
-PreReq:       OpenPKG, openpkg >= 20020206, X11
+BuildPreReq:  OpenPKG, openpkg >= 20020206, gcc, X11, jpeg, png, zlib
+PreReq:       OpenPKG, openpkg >= 20020206, X11, jpeg, png, zlib
+%if "%{with_freetype}" == "yes"
+BuildPreReq:  freetype
+PreReq:       freetype
+%endif
 AutoReq:      no
 AutoReqProv:  no
 
+# FIXME Do we need PreReq to match BuildPreReq?
 %description
-    Qt is a GUI software toolkit. Qt simplifies the task of writing
-    and maintaining GUI (graphical user interface) applications. Qt is
-    written in C++ and is fully object-oriented. It has everything you
-    need to create professional GUI applications. And it enables you to
-    create them quickly. Qt is a multi-platform toolkit. When developing
-    software with Qt, you can run it on the X Window System (Unix/X11)
-    or Microsoft Windows NT and Windows 95/98. Simply recompile your
-    source code on the platform you want. Qt cuts down the complexity in
-    implementing large and complex systems. Its ingenious signal-slot
-    technology enables true component programming.
+    Qt is a GUI (graphical user interface) software toolkit which simplifies
+    the task of writing and maintaining GUIs. Qt enables the developer to
+    create prototypes and feature-rich applications quickly. Offering C++
+    library bindings, Qt enables development in an object-oriented
+    environment, and appeals to developers with portability in mind. Qt's
+    identical C++ library bindings allow for error-free recompiling on at
+    least the three major platforms Unix (and Linux), Apple Macintosh, and
+    Microsoft Windows. Its API architecture is designed to reduce complexity
+    and increase reliability through a signal and slot mechanism, which is
+    similar to templates in C++, but with influences from component
+    technology.
 
 %prep
     %setup -q -n qt-x11-free-%{version}
@@ -64,17 +78,35 @@ AutoReqProv:  no
 %build
     QTDIR=`pwd`; export QTDIR
     PATH="%{l_prefix}/bin:$PATH"; export PATH
+    case "%{l_target}" in
+        *-freebsd* )
+            oscomp="freebsd-g++"
+            ;;
+        *-linux* )
+            oscomp="linux-g++"
+            ;;
+        *-solaris* )
+            oscomp="solaris-g++"
+            ;;
+    esac
     echo "yes" | ./configure \
-        -release -shared \
-        -sm -no-nas-sound -no-thread -qt-gif -system-libjpeg \
-        -system-libpng -system-zlib \
+        -platform $oscomp -prefix %{l_prefix} \
+        -release -shared -thread -stl -qt-gif \
+        -system-libpng -system-zlib -system-libjpeg \
+        -no-nas-sound -no-tablet -no-xkb \
+%if "%{with_freetype}" == "yes"
+        -xft \
+%else
+        -no-xft \
+%endif
+%if "%{with_other}" == "yes"
+        -sm -xinerama -xrender \
+%else
+        -no-sm -no-xinerama -no-xrender \
+%endif
         -I%{l_prefix}/include \
         -L%{l_prefix}/lib \
-        -R%{l_prefix}/lib \
-        -I`%{l_prefix}/etc/rc --query x11_incdir` \
-        -L`%{l_prefix}/etc/rc --query x11_libdir` \
-        -R`%{l_prefix}/etc/rc --query x11_libdir` \
-        -ljpeg -lpng -lz
+        -R%{l_prefix}/lib
     %{l_make} %{l_mflags -O} \
         MAKE="%{l_make} %{l_mflags -O}" \
         symlinks src-moc sub-src sub-tools