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: 13-Aug-2003 11:01:56
Branch: HEAD Handle: 2003081310015302
Modified files:
openpkg-src/lyx lyx.spec
openpkg-src/mico mico.spec
openpkg-src/mysqlcc mysqlcc.spec
openpkg-src/qt qt.spec
openpkg-src/scribus scribus.spec
Log:
Review and apply changes to correctly compile and link with Qt headers and
libraries #219
Summary:
Revision Changes Path
1.19 +36 -51 openpkg-src/lyx/lyx.spec
1.45 +6 -3 openpkg-src/mico/mico.spec
1.7 +11 -7 openpkg-src/mysqlcc/mysqlcc.spec
1.74 +14 -4 openpkg-src/qt/qt.spec
1.16 +16 -28 openpkg-src/scribus/scribus.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/lyx/lyx.spec
============================================================================
$ cvs diff -u -r1.18 -r1.19 lyx.spec
--- openpkg-src/lyx/lyx.spec 22 Jul 2003 14:45:18 -0000 1.18
+++ openpkg-src/lyx/lyx.spec 13 Aug 2003 09:01:55 -0000 1.19
@@ -37,7 +37,7 @@
Group: Print
License: GPL
Version: %{V_lyx}
-Release: 20030722
+Release: 20030813
# package options
%option with_xforms no
@@ -59,7 +59,7 @@
BuildPreReq: jpeg, tiff, xpm
PreReq: jpeg, tiff, xpm
%else
-BuildPreReq: qt
+BuildPreReq: qt, pkgconfig
PreReq: qt
%endif
PreReq: gv, ghostscript, ghostscript::with_x11 = yes
@@ -96,61 +96,43 @@
%{l_make} includes
%{l_make} depend
%{l_make} %{l_mflags}
- %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
) || exit 1
%endif
-
- ( cd lyx-%{V_lyx}
-%if "%{with_xforms}" == "yes"
+ echo "qt_cv_libname=qt" >config.cache
+ CC="%{l_cc}" \
+ CXX="%{l_cxx}" \
+%if "%{with_xforms}" == "yes"
+ CFLAGS="%{l_cflags -O}" \
+ CXXFLAGS="%{l_cxxflags -O}" \
+ CPPFLAGS="%{l_cppflags}" \
+ LDFLAGS="%{l_ldflags}" \
%else
- echo "qt_cv_libname=qt" >config.cache
- EXTRALIBS="-lqt -lXext"
- # FIXME mlelstv
- # -- our Solaris boxes do not support OpenGL, so
- # qt doesn't pick up OpenGL support.
- # Unfortunately there is no information about
- # this dependency in the qt package and things
- # will break when freebsd/linux do not have GL
- # installed, or when solaris gets GL installed
- case "%{l_target}" in
- *-freebsd*)
- EXTRALIBS="$EXTRALIBS -lGL"
- ;;
- *-linux*)
- EXTRALIBS="$EXTRALIBS -lGL -dl"
- ;;
- *-solaris*)
- EXTRALIBS="$EXTRALIBS -dl"
- ;;
- esac
+ CFLAGS="%{l_cflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \
+ CXXFLAGS="%{l_cxxflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`"
\
+ CPPFLAGS="%{l_cppflags} `%{l_prefix}/bin/pkg-config --cflags-only-I qt`" \
+ LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs-only-L qt`" \
+ LIBS="`%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other qt`" \
%endif
- CC="%{l_cc}" \
- CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- CPPFLAGS="%{l_cppflags}" \
- LDFLAGS="%{l_ldflags}" \
- ./configure \
- --cache-file=./config.cache \
- --prefix=%{l_prefix} \
- --with-libiconv-prefix=%{l_prefix} \
- --with-x \
- --x-includes=$x11_inc \
- --x-libraries=$x11_lib \
- --disable-shared \
-%if "%{with_xforms}" == "yes"
- --with-frontend=xforms \
- --with-extra-lib=$RPM_BUILD_ROOT%{l_prefix}/lib \
- --with-extra-inc=$RPM_BUILD_ROOT%{l_prefix}/include/X11 \
+ ./configure \
+ --cache-file=./config.cache \
+ --prefix=%{l_prefix} \
+ --with-libiconv-prefix=%{l_prefix} \
+ --with-x \
+ --x-includes=$x11_inc \
+ --x-libraries=$x11_lib \
+ --disable-shared \
+%if "%{with_xforms}" == "yes"
+ --with-frontend=xforms \
+ --with-extra-lib=$RPM_BUILD_ROOT%{l_prefix}/lib \
+ --with-extra-inc=$RPM_BUILD_ROOT%{l_prefix}/include/X11 \
%else
- --with-frontend=qt \
- --with-qt-dir=%{l_prefix} \
- --with-qt-libraries="%{l_prefix}/lib" \
- --with-qt-includes="%{l_prefix}/include/qt" \
+ --with-frontend=qt \
+ --with-qt-dir=%{l_prefix} \
+ --with-qt-libraries="%{l_prefix}/lib" \
+ --with-qt-includes="%{l_prefix}/include/qt" \
%endif
- --without-aiksaurus
- %{l_make} %{l_mflags -O} LIBS="$LIBS $EXTRALIBS"
- ) || exit 1
+ --without-aiksaurus
+ %{l_make} %{l_mflags -O}
%install
( cd lyx-%{V_lyx}
@@ -161,6 +143,9 @@
%if "%{with_xforms}" == "yes"
rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
+ ( cd xforms-%{V_xforms}
+ %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
+ ) || exit 1
%endif
rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/locale
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mico/mico.spec
============================================================================
$ cvs diff -u -r1.44 -r1.45 mico.spec
--- openpkg-src/mico/mico.spec 31 Jul 2003 17:46:54 -0000 1.44
+++ openpkg-src/mico/mico.spec 13 Aug 2003 09:01:54 -0000 1.45
@@ -33,7 +33,7 @@
Group: System
License: LGPL/GPL
Version: 2.3.10
-Release: 20030731
+Release: 20030813
# package options
%option with_ssl no
@@ -56,7 +56,7 @@
PreReq: openssl
%endif
%if "%{with_qt}" == "yes"
-BuildPreReq: qt
+BuildPreReq: qt, pkgconfig
PreReq: qt
%endif
%if "%{with_gtk}" == "yes"
@@ -96,7 +96,10 @@
CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/openssl"
%endif
%if "%{with_qt}" == "yes"
- CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/qt"
+ CFLAGS="$CFLAGS `%{l_prefix}/bin/pkg-config --cflags-only-other qt`"
+ CXXFLAGS="$CXXFLAGS `%{l_prefix}/bin/pkg-config --cflags-only-other qt`"
+ CPPFLAGS="$CPPFLAGS `%{l_prefix}/bin/pkg-config --cflags-only-I qt`"
+ LDFLAGS="$LDFLAGS `%{l_prefix}/bin/pkg-config --libs-only-L qt`"
%endif
%if "%{with_gtk}" == "yes"
CPPFLAGS="$CPPFLAGS -I%{l_prefix}/include/gtk"
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/mysqlcc/mysqlcc.spec
============================================================================
$ cvs diff -u -r1.6 -r1.7 mysqlcc.spec
--- openpkg-src/mysqlcc/mysqlcc.spec 11 Jul 2003 09:50:09 -0000 1.6
+++ openpkg-src/mysqlcc/mysqlcc.spec 13 Aug 2003 09:01:53 -0000 1.7
@@ -33,7 +33,7 @@
Group: Database
License: GPL
Version: 0.9.2
-Release: 20030711
+Release: 20030813
# list of sources
Source0:
http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQLCC/mysqlcc-%{version}-src.tar.gz
@@ -57,18 +57,22 @@
%{l_shtool} subst \
-e 's;^\(QMAKESPEC=\)$QTDIR\(\/.*\)$;\1%{l_prefix}/share/qt\2;' \
configure
- # FIXME: find a better solution instead of hard-coding -lSM -ldl
%{l_shtool} subst \
-e 's;^\([ ]*INCLUDEPATH[ ]*+=.*\)\(\\[ ]*\)$;\1
%{l_prefix}/include/qt \2;' \
- -e 's;^\([ ]*LIBS[ ]*+=.*\)$;\1 -lSM -ldl;' \
mysqlcc.pro.in
%build
# translate target names into qmake system types
case "%{l_target}" in
- *-freebsd*) host=freebsd-g++ ;;
- *-linux*) host=linux-g++ ;;
- *-solaris*) host=solaris-g++ ;;
+ *-freebsd*) host=freebsd-g++
+ LIBS="-lm"
+ ;;
+ *-linux*) host=linux-g++
+ LIBS="-lm"
+ ;;
+ *-solaris*) host=solaris-g++
+ LIBS="-lm -lnsl -lsocket"
+ ;;
*) host=`uname | tr A-Z a-z`-g++ ;;
esac
echo "ac_cv_host=\"$host\"" >./config.cache
@@ -79,7 +83,7 @@
CXXFLAGS="%{l_cxxflags -O}" \
CPPFLAGS="%{l_cppflags qt}" \
LDFLAGS="%{l_ldflags mysql}" \
- LIBS="-lm" \
+ LIBS="$LIBS" \
./configure \
--cache-file=./config.cache \
--prefix=%{l_prefix} \
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/qt/qt.spec
============================================================================
$ cvs diff -u -r1.73 -r1.74 qt.spec
--- openpkg-src/qt/qt.spec 6 Aug 2003 06:49:16 -0000 1.73
+++ openpkg-src/qt/qt.spec 13 Aug 2003 09:01:53 -0000 1.74
@@ -33,7 +33,7 @@
Group: XWindow
License: GPL
Version: 3.2.0
-Release: 20030806
+Release: 20030813
# package options
%option with_pgsql no
@@ -45,8 +45,8 @@
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20030103, X11, pkgconfig, gcc
-PreReq: OpenPKG, openpkg >= 20030103, X11, pkgconfig
+BuildPreReq: OpenPKG, openpkg >= 20030103, X11, gcc
+PreReq: OpenPKG, openpkg >= 20030103, X11
%if "%{with_pgsql}" == "yes"
BuildPreReq: postgresql
PreReq: postgresql
@@ -126,6 +126,9 @@
MAKE="%{l_make} %{l_mflags -O}" \
symlinks src-qmake src-moc sub-src sub-tools
+ # generate the multithreaded library definitions also
+ mv lib/qt.pc .
+
# run configure a second time to get threaded libs as well
CC="%{l_cc}" \
CXX="%{l_cxx}" \
@@ -155,6 +158,13 @@
MAKE="%{l_make} %{l_mflags -O}" \
symlinks src-qmake src-moc sub-src sub-tools
+ # patch and prepare pkg-config (.pc) files
+ mv qt.pc lib
+ %{l_shtool} subst \
+ -e 's;[ \t]*$;;g' \
+ -e 's;\(Libs.*$\);\1 -pthread;g' \
+ lib/qt-mt.pc
+
%install
rm -rf $RPM_BUILD_ROOT
@@ -201,7 +211,7 @@
%{l_shtool} install -c -m 644 \
lib/*.a lib/*.prl $RPM_BUILD_ROOT%{l_prefix}/lib/
%{l_shtool} install -c -m 644 \
- lib/qt.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
+ lib/*.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
%{l_shtool} install -c -m 644 \
doc/man/man3/*.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
%{l_shtool} install -c -m 644 \
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/scribus/scribus.spec
============================================================================
$ cvs diff -u -r1.15 -r1.16 scribus.spec
--- openpkg-src/scribus/scribus.spec 11 Aug 2003 10:17:28 -0000 1.15
+++ openpkg-src/scribus/scribus.spec 13 Aug 2003 09:01:55 -0000 1.16
@@ -26,10 +26,6 @@
# FIXME: ms: Has JUNK status, it locks up during a fcntl(2) on FreeBSD.
# FIXME: ms: Missing TIFF and JPEG logic, because of faulty configure.
-# package version
-%define V_dist 1.0.1
-%define V_opkg 1.0.1
-
# package information
Name: scribus
Summary: Desktop Publishing Application
@@ -39,18 +35,20 @@
Distribution: OpenPKG [JUNK]
Group: Editor
License: GPL
-Version: %{V_opkg}
-Release: 20030811
+Version: 1.0.1
+Release: 20030813
# list of sources
-Source0: http://scribus.planetmirror.com/scribus-%{V_dist}.tar.gz
+Source0: http://scribus.planetmirror.com/scribus-%{version}.tar.gz
Patch0: scribus.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20030103, qt, freetype, ghostscript, png, jpeg,
tiff, zlib
-PreReq: OpenPKG, openpkg >= 20030103, qt, freetype, ghostscript, png, jpeg,
tiff, zlib
+BuildPreReq: OpenPKG, openpkg >= 20030103, qt, freetype
+BuildPreReq: ghostscript, png, jpeg, tiff, zlib, pkgconfig
+PreReq: OpenPKG, openpkg >= 20030103, qt, freetype
+PreReq: ghostscript, png, jpeg, tiff, zlib
AutoReq: no
AutoReqProv: no
@@ -65,41 +63,31 @@
Postscript import/export and creation of color separations.
%prep
- %setup -q -n scribus-%{V_dist}
+ %setup -q -n scribus-%{version}
%patch -p0
%{l_shtool} subst \
-e 's; ! -f $libstdcpp;;g' \
configure
%build
- case "%{l_target}" in
- *-freebsd*)
- LIBS="$LIBS -lX11 -lXext -lGL"
- ;;
- *-solaris* )
- LIBS="$LIBS -lrt"
- ;;
- esac
- X11INC=`%{l_prefix}/etc/rc --query x11_incdir`
- X11LIB=`%{l_prefix}/etc/rc --query x11_libdir`
CC="%{l_cc}" \
CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cxxflags -O}" \
- CPPFLAGS="%{l_cppflags tiff qt freetype2}" \
- LDFLAGS="%{l_ldflags} -L$X11LIB" \
- LIBS="$LIBS" \
+ CFLAGS="%{l_cflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`" \
+ CXXFLAGS="%{l_cxxflags -O} `%{l_prefix}/bin/pkg-config --cflags-only-other qt`"
\
+ CPPFLAGS="%{l_cppflags tiff} `%{l_prefix}/bin/pkg-config --cflags-only-I qt`" \
+ LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/pkg-config --libs-only-L qt`" \
+ LIBS="$LIBS `%{l_prefix}/bin/pkg-config --libs-only-l --libs-only-other qt`" \
./configure \
--prefix=%{l_prefix} \
--disable-shared \
--enable-static \
--with-x \
- --x-includes=$X11INC \
- --x-libraries=$X11LIB \
+ --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
+ --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir`\
--with-qt-dir=%{l_prefix} \
--with-qt-includes=%{l_prefix}/include/qt/ \
--with-qt-libraries=%{l_prefix}/lib/
- %{l_make} %{l_mflags -O} LIBS="$LIBS"
+ %{l_make} %{l_mflags -O}
%install
rm -rf $RPM_BUILD_ROOT
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]