Browse Source

switch to %option(s); no need to ensure optional things

master
parent
commit
9757e8a28e
  1. 30
      qt/qt.spec

30
qt/qt.spec

@ -24,9 +24,7 @@
## ##
# package options # package options
%ifndef with_xft %option with_xft no
%define with_xft no
%endif
# package information # package information
Name: qt Name: qt
@ -38,7 +36,7 @@ Distribution: OpenPKG [EVAL]
Group: XWindow Group: XWindow
License: GPL License: GPL
Version: 3.1.1 Version: 3.1.1
Release: 20021217 Release: 20021230
# list of sources # list of sources
Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-free-%{version}.tar.gz Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-free-%{version}.tar.gz
@ -46,8 +44,8 @@ Source0: ftp://ftp.trolltech.com/pub/qt/source/qt-x11-free-%{version}.tar.g
# build information # build information
Prefix: %{l_prefix} Prefix: %{l_prefix}
BuildRoot: %{l_buildroot} BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206, X11, gcc BuildPreReq: OpenPKG, openpkg >= 20021230, X11, gcc
PreReq: OpenPKG, openpkg >= 20020206, X11 PreReq: OpenPKG, openpkg >= 20021230, X11
AutoReq: no AutoReq: no
AutoReqProv: no AutoReqProv: no
@ -64,8 +62,7 @@ AutoReqProv: no
similar to templates in C++, but with influences from component similar to templates in C++, but with influences from component
technology. technology.
Options: %options
--define 'with_xft %{with_xft}'
%prep %prep
%setup -q -n qt-x11-free-%{version} %setup -q -n qt-x11-free-%{version}
@ -79,22 +76,6 @@ AutoReqProv: no
* ) echo "platform %{l_target} not supported" 2>&1; exit 1 ;; * ) echo "platform %{l_target} not supported" 2>&1; exit 1 ;;
esac esac
# ensure that libXft exists
%if "%{with_xft}" == "yes"
found_xft=""
for ext in a so sl; do
if [ -f "`%{l_prefix}/etc/rc --query x11_libdir`/libXft.$ext" ]; then
found_xft="da"
break;
fi
done
if [ ".$found_xft" = . ]; then
echo "ERROR! Library libXft could not be found," 2>&1;
echo "please consider building without with_xft" 2>&1;
exit 1;
fi
%endif
# special trolltech configuration # special trolltech configuration
echo "yes" | ./configure \ echo "yes" | ./configure \
-prefix %{l_prefix} \ -prefix %{l_prefix} \
@ -113,7 +94,6 @@ AutoReqProv: no
%{l_make} %{l_mflags -O} \ %{l_make} %{l_mflags -O} \
MAKE="%{l_make} %{l_mflags -O}" \ MAKE="%{l_make} %{l_mflags -O}" \
symlinks src-qmake src-moc sub-src sub-tools symlinks src-qmake src-moc sub-src sub-tools
# FIXME: "-Wl,-rpath,/tmp/qt-x11-free-3.0.4/lib"
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT

Loading…
Cancel
Save