From 2d2938d8f423c7ef2ce782323e9c08c2c3190fb3d3203c98cc6885ddf718b6ce Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 28 Jun 2007 17:41:05 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/scribus?expand=0&rev=7 --- lib64.diff | 22 ++++ scribus-1.3.3.9-no-rpath.diff | 20 ++++ scribus.changes | 5 + scribus.spec | 106 +++++------------- ...-comparsion-b.patch => string-compare.diff | 95 +++++++++------- 5 files changed, 130 insertions(+), 118 deletions(-) create mode 100644 lib64.diff create mode 100644 scribus-1.3.3.9-no-rpath.diff rename scribus-1.3.3.9_string-literal-comparsion-b.patch => string-compare.diff (63%) diff --git a/lib64.diff b/lib64.diff new file mode 100644 index 0000000..32599fe --- /dev/null +++ b/lib64.diff @@ -0,0 +1,22 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -79,9 +79,9 @@ SET(SCRIPTSDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/") + ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"") + SET(TEMPLATEDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/templates/") + ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"") +-SET(LIBDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/") ++SET(LIBDIR "lib${LIB_SUFFIX}/${MAIN_DIR_NAME}${TAG_VERSION}/") + ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"") +-SET(PLUGINDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/") ++SET(PLUGINDIR "lib${LIB_SUFFIX}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/") + ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"") + set(CMAKE_INSTALL_RPATH ${PLUGINDIR}) + +--- scribus/CMakeLists.txt ++++ scribus/CMakeLists.txt +@@ -438,4 +438,4 @@ ENDIF(RENDER_LIB STREQUAL "LIBART") + + INSTALL(TARGETS ${EXE_NAME} + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib) ++ LIBRARY DESTINATION lib${LIB_SUFFIX}) diff --git a/scribus-1.3.3.9-no-rpath.diff b/scribus-1.3.3.9-no-rpath.diff new file mode 100644 index 0000000..b0f8c58 --- /dev/null +++ b/scribus-1.3.3.9-no-rpath.diff @@ -0,0 +1,20 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -7,7 +7,7 @@ + SET(CMAKE_COLOR_MAKEFILE ON) + SET(CMAKE_VERBOSE_MAKEFILE ON) + SET(CMAKE_INCLUDE_CURRENT_DIR TRUE) +-SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) ++SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) + #SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + #SET(CMAKE_SKIP_RPATH:BOOL NO) + SET(CMAKE_SKIP_RULE_DEPENDENCY TRUE) +@@ -69,7 +69,7 @@ + SET(DOCDIR "share/doc/${MAIN_DIR_NAME}-${VERSION}/") + ENDIF (TAG_VERSION) + ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"") +-SET(DOCDIR "share/doc/${MAIN_DIR_NAME}${TAG_VERSION}/") ++SET(DOCDIR "share/doc/packages/${MAIN_DIR_NAME}${TAG_VERSION}/") + ADD_DEFINITIONS("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"") + SET(ICONDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/icons/") + ADD_DEFINITIONS("-DICONDIR=\\\"${CMAKE_INSTALL_PREFIX}/${ICONDIR}\\\"") diff --git a/scribus.changes b/scribus.changes index 3e2b699..a46fd2a 100644 --- a/scribus.changes +++ b/scribus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 27 19:25:56 CEST 2007 - dmueller@suse.de + +- build against cmake to fix various issues + ------------------------------------------------------------------- Wed Jun 13 15:26:52 CEST 2007 - ltinkl@suse.cz diff --git a/scribus.spec b/scribus.spec index 5e79698..922f3be 100644 --- a/scribus.spec +++ b/scribus.spec @@ -12,6 +12,7 @@ Name: scribus BuildRequires: cairo-devel cups cups-devel kdelibs3-devel python-devel shared-mime-info +BuildRequires: cmake %if %suse_version < 1000 BuildRequires: libjpeg-devel %endif @@ -28,9 +29,11 @@ Suggests: AdobeICCProfiles Provides: scribus-short-words Obsoletes: scribus-i18n-de scribus-i18n-en scribus-i18n-fr scribus-short-words Version: 1.3.3.9 -Release: 1 +Release: 2 Source: %{name}-%{version}.tar.bz2 -Patch2: %{name}-%{version}_string-literal-comparsion-b.patch +Patch3: %{name}-1.3.3.9-no-rpath.diff +Patch4: string-compare.diff +Patch5: lib64.diff URL: http://www.scribus.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Open Source Page Layout and Desktop Publishing (DTP) @@ -64,78 +67,31 @@ Authors: Thomas Zastrow Steve Callcott -%package devel -Summary: Open Source Page Layout / Desktop Publishing (DTP) -Group: Productivity/Publishing/Other -Requires: %{name} = %{version} freetype2-devel zlib-devel libstdc++-devel glibc-devel -Autoreqprov: on - -%description devel -Scribus is an desktop open source page layout program with the aim of -producing commerical grade output in PDF and Postscript, primarily, -though not exclusively for Linux. - -While the goals of the program are for ease of use and simple easy to -understand tools, Scribus offers support for professional publishing -features, such as CMYK colors, easy PDF creation, Encapsulated -Postscript import/export and creation of color separations. - - - -Authors: --------- - Franz Schmid - Paul F. Johnson - Craig Bradney - Peter Linnell - Petr Vaněk - Riku Leino - Craig Ringer - Alessandro Rimoldi http://ideale.ch/contact - Jean-Jacques Sarton - Christian Töpp - Alastair Robinson - Thomas Zastrow - Steve Callcott - -%define prefix /usr %prep %setup -q -%patch2 +%patch3 +%patch4 +%patch5 %build -. /etc/opt/kde3/common_options -update_admin --no-unsermake -#autoconf -export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -./configure \ - --prefix=%{prefix} \ - --libdir=%{_libdir} \ - --mandir=%{_mandir} \ - --infodir=%{_infodir} \ - --sysconfdir=%{_sysconfdir} \ - --with-qt-libraries=/usr/%_lib/qt3/%_lib \ - --with-docdir=%{_docdir}/%{name} \ -%ifarch x86_64 ppc64 s390x - --enable-libsuffix=64 \ -%endif - --with-pythondir=%{_libdir}/python \ - --with-xinerama -make %{?jobs:-j %jobs} +mkdir build +cd build +export CXXFLAGS="$RPM_OPT_FLAGS" +export CFLAGS="$CXXFLAGS" +cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \ + -DCMAKE_SKIP_RPATH=TRUE -DDOCDIR=%{_docdir} -DLIB_INSTALL_DIR=%{_libdir} \ + -DLIB_SUFFIX=$(echo %_lib | cut -b4-) .. +make %install -#. /etc/opt/kde3/common_options -make DESTDIR=$RPM_BUILD_ROOT install +cd build +%makeinstall +cd .. mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name} -cp AUTHORS COPYING ChangeLog NEWS README PACKAGING TODO $RPM_BUILD_ROOT%{_docdir}/%{name} -#suse_update_desktop_file -i %name Office WordProcessor -rm $RPM_BUILD_ROOT%{_libdir}/scribus/plugins/*.*a $RPM_BUILD_ROOT%{_libdir}/scribus/plugins/*/*.*a -install -d $RPM_BUILD_ROOT%{_datadir}/applications -install scribus.desktop $RPM_BUILD_ROOT%{_datadir}/applications/ -install -d $RPM_BUILD_ROOT%{_datadir}/mime/packages -install scribus.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/scribus.xml -%suse_update_desktop_file scribus +install -m 644 -D $RPM_BUILD_ROOT/usr/share/scribus/icons/scribusicon.png $RPM_BUILD_ROOT/usr/share/icons/hicolor/48x48/apps/scribusicon.png +%suse_update_desktop_file %name Office WordProcessor +install -m 644 -D scribus.desktop $RPM_BUILD_ROOT%{_datadir}/applications/scribus.desktop +install -m 644 -D scribus.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/scribus.xml %post if [ -f /usr/bin/update-mime-database ]; then @@ -152,25 +108,21 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) -%doc %{_docdir}/%{name} +%doc AUTHORS ChangeLog NEWS README TODO %{_bindir}/* /usr/share/applications/*.desktop /usr/share/man/man?/*.* /usr/share/man/*/man?/*.* -/usr/share/pixmaps/* %{_libdir}/scribus %{_prefix}/share/mime/packages/*.xml %{_prefix}/share/scribus -%{_prefix}/share/doc/scribus-%{version} -# This should be owned by filesystem or man, but there are only scribus files: -%lang(pl) %dir /usr/share/man/pl -%lang(pl) %dir /usr/share/man/pl/man1 - -%files devel -%defattr(-, root, root) -%{_prefix}/include/scribus +/usr/share/icons/hicolor/48x48/apps/scribusicon.png +%dir /usr/share/man/pl +%dir /usr/share/man/pl/man1 %changelog +* Wed Jun 27 2007 - dmueller@suse.de +- build against cmake to fix various issues * Wed Jun 13 2007 - ltinkl@suse.cz - update to 1.3.3.9 bugfix release - many bugfixes diff --git a/scribus-1.3.3.9_string-literal-comparsion-b.patch b/string-compare.diff similarity index 63% rename from scribus-1.3.3.9_string-literal-comparsion-b.patch rename to string-compare.diff index 9d3e18f..d79d4ba 100644 --- a/scribus-1.3.3.9_string-literal-comparsion-b.patch +++ b/string-compare.diff @@ -1,157 +1,170 @@ +--- scribus/plugins/scriptplugin/cmdcolor.cpp ++++ scribus/plugins/scriptplugin/cmdcolor.cpp +@@ -147,7 +147,7 @@ PyObject *scribus_delcolor(PyObject* /* self */, PyObject* args) + char *Repl = const_cast(CommonStrings::None.latin1()); + if (!PyArg_ParseTuple(args, "es|es", "utf-8", &Name, "utf-8", &Repl)) + return NULL; +- if (Name == "") ++ if (!*Name) + { + PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot delete a color with an empty name.","python error")); + return NULL; --- scribus/plugins/scriptplugin/cmdmisc.cpp +++ scribus/plugins/scriptplugin/cmdmisc.cpp -@@ -190,7 +190,7 @@ +@@ -190,7 +190,7 @@ PyObject *scribus_senttolayer(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Layer == "") -+ if (Layer[0] == 0) ++ if (!*Layer) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; -@@ -229,7 +229,7 @@ +@@ -229,7 +229,7 @@ PyObject *scribus_layervisible(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") -+ if (Name[0] == 0) ++ if (!*Name) { PyErr_SetString(PyExc_ValueError, QString("Cannot have an empty layer name")); return NULL; -@@ -261,7 +261,7 @@ +@@ -261,7 +261,7 @@ PyObject *scribus_layerprint(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") -+ if (Name[0] == 0) ++ if (!*Name) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; -@@ -292,7 +292,7 @@ +@@ -292,7 +292,7 @@ PyObject *scribus_glayervisib(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") -+ if (Name[0] == 0) ++ if (!*Name) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; -@@ -323,7 +323,7 @@ +@@ -323,7 +323,7 @@ PyObject *scribus_glayerprint(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") -+ if (Name[0] == 0) ++ if (!*Name) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; -@@ -355,7 +355,7 @@ +@@ -355,7 +355,7 @@ PyObject *scribus_removelayer(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") -+ if (Name[0] == 0) ++ if (!*Name) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; -@@ -410,7 +410,7 @@ +@@ -410,7 +410,7 @@ PyObject *scribus_createlayer(PyObject* /* self */, PyObject* args) return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") -+ if (Name[0] == 0) ++ if (!*Name) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create layer without a name.","python error")); return NULL; --- scribus/plugins/scriptplugin/cmdobj.cpp +++ scribus/plugins/scriptplugin/cmdobj.cpp -@@ -30,7 +30,7 @@ +@@ -30,7 +30,7 @@ PyObject *scribus_newrect(PyObject* /* self */, PyObject* args) ScMW->doc->toolSettings.dWidth, ScMW->doc->toolSettings.dBrush, ScMW->doc->toolSettings.dPen, true); ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } -@@ -59,7 +59,7 @@ +@@ -59,7 +59,7 @@ PyObject *scribus_newellipse(PyObject* /* self */, PyObject* args) return NULL; } ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } -@@ -86,7 +86,7 @@ +@@ -86,7 +86,7 @@ PyObject *scribus_newimage(PyObject* /* self */, PyObject* args) return NULL; } ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } -@@ -113,7 +113,7 @@ +@@ -113,7 +113,7 @@ PyObject *scribus_newtext(PyObject* /* self */, PyObject* args) return NULL; } ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } -@@ -151,7 +151,7 @@ +@@ -151,7 +151,7 @@ PyObject *scribus_newline(PyObject* /* self */, PyObject* args) it->updateClip(); ScMW->doc->setRedrawBounding(it); it->OwnPage = ScMW->doc->OnPage(it); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } -@@ -224,7 +224,7 @@ +@@ -224,7 +224,7 @@ PyObject *scribus_polyline(PyObject* /* self */, PyObject* args) } ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); ScMW->view->AdjustItemSize(it); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) { it->setItemName(QString::fromUtf8(Name)); } -@@ -304,7 +304,7 @@ +@@ -304,7 +304,7 @@ PyObject *scribus_polygon(PyObject* /* self */, PyObject* args) } ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); ScMW->view->AdjustItemSize(it); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } -@@ -391,7 +391,7 @@ - } - ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); - ScMW->view->AdjustItemSize(it); -- if (Name != "") -+ if (Name[0] != 0) - it->setItemName(QString::fromUtf8(Name)); - return PyString_FromString(it->itemName().utf8()); - } -@@ -429,7 +429,7 @@ +@@ -429,7 +429,7 @@ PyObject *scribus_pathtext(PyObject* /* self */, PyObject* args) PageItem *it = ScMW->doc->Items->at(i); ScMW->view->ToPathText(); ScMW->view->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it); - if (Name != "") -+ if (Name[0] != 0) ++ if (*Name) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } -@@ -532,7 +532,7 @@ +@@ -532,7 +532,7 @@ PyObject *scribus_setstyle(PyObject* /* self */, PyObject* args) return NULL; } // for current item only - if (ScMW->doc->m_Selection->count() == 0 || name != "") -+ if (ScMW->doc->m_Selection->count() == 0 || name[0] != 0) ++ if (ScMW->doc->m_Selection->count() == 0 || *name) { // quick hack to always apply on the right frame - pv ScMW->view->Deselect(true); +--- scribus/plugins/scriptplugin/cmdobj.cpp ++++ scribus/plugins/scriptplugin/cmdobj.cpp +@@ -391,7 +391,7 @@ PyObject *scribus_bezierline(PyObject* /* self */, PyObject* args) + } + ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); + ScMW->view->AdjustItemSize(it); +- if (Name != "") ++ if (*Name) + it->setItemName(QString::fromUtf8(Name)); + return PyString_FromString(it->itemName().utf8()); + }