jreznik pushed to taskjuggler (epel7). "Patch to disable kdepim3 support correctly."

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Apr 2 16:18:24 UTC 2015


>From cc9e3bd36514b9ed907d5ed060394dbcabd3df4f Mon Sep 17 00:00:00 2001
From: Kevin Kofler <kkofler at fedoraproject.org>
Date: Mon, 9 Jun 2008 13:03:08 +0000
Subject: Patch to disable kdepim3 support correctly.


diff --git a/taskjuggler-2.4.1-no-kdepim3.patch b/taskjuggler-2.4.1-no-kdepim3.patch
new file mode 100644
index 0000000..7f3efbc
--- /dev/null
+++ b/taskjuggler-2.4.1-no-kdepim3.patch
@@ -0,0 +1,391 @@
+diff -Nur taskjuggler-2.4.1/configure taskjuggler-2.4.1-no-kdepim3/configure
+--- taskjuggler-2.4.1/configure	2008-05-06 15:05:04.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/configure	2008-06-09 15:00:48.000000000 +0200
+@@ -32498,183 +32498,8 @@
+ 
+ 
+ 
+-        LIBKCAL="-lkcal"
+-
+-
+-
+-
+-
+-
+-   kde_safe_cppflags=$CPPFLAGS
+-   CPPFLAGS="$CPPFLAGS $all_includes"
+-    ac_ext=cpp
+-ac_cpp='$CXXCPP $CPPFLAGS'
+-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+-
+-ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+-
+-
+-
+-
+-for ac_header in libkcal/calendarlocal.h libkcal/todo.h
+-do
+-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  { echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-else
+-  # Is the header compilable?
+-{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-$ac_includes_default
+-#include <$ac_header>
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (ac_try="$ac_compile"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_compile") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } && {
+-	 test -z "$ac_cxx_werror_flag" ||
+-	 test ! -s conftest.err
+-       } && test -s conftest.$ac_objext; then
+-  ac_header_compiler=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-	ac_header_compiler=no
+-fi
+-
+-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6; }
+-
+-# Is the header present?
+-{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+-cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h.  */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h.  */
+-#include <$ac_header>
+-_ACEOF
+-if { (ac_try="$ac_cpp conftest.$ac_ext"
+-case "(($ac_try" in
+-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+-  *) ac_try_echo=$ac_try;;
+-esac
+-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+-  ac_status=$?
+-  grep -v '^ *+' conftest.er1 >conftest.err
+-  rm -f conftest.er1
+-  cat conftest.err >&5
+-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+-  (exit $ac_status); } >/dev/null && {
+-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+-	 test ! -s conftest.err
+-       }; then
+-  ac_header_preproc=yes
+-else
+-  echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-  ac_header_preproc=no
+-fi
+-
+-rm -f conftest.err conftest.$ac_ext
+-{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6; }
+-
+-# So?  What about this header?
+-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+-  yes:no: )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+-    ac_header_preproc=yes
+-    ;;
+-  no:yes:* )
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+-
+-    ;;
+-esac
+-{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+-  echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+-  eval "$as_ac_Header=\$ac_header_preproc"
+-fi
+-ac_res=`eval echo '${'$as_ac_Header'}'`
+-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+-echo "${ECHO_T}$ac_res" >&6; }
+-
+-fi
+-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+-  cat >>confdefs.h <<_ACEOF
+-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+-_ACEOF
+-
+-fi
+-
+-done
+-
+-   CPPFLAGS=$kde_safe_cppflags
+-   ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-
+-
+-    if test "$ac_cv_header_libkcal_calendarlocal_h" = "no" -o \
+-            "$ac_cv_header_libkcal_todo_h" = "no" ; then
+-      { { echo "$as_me:$LINENO: error: KDEPIM header files no found. Please make sure
+-you have KDEPIM and the corresponding development packages
+-installed!" >&5
+-echo "$as_me: error: KDEPIM header files no found. Please make sure
+-you have KDEPIM and the corresponding development packages
+-installed!" >&2;}
+-   { (exit 1); exit 1; }; }
+-    fi
++    echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist
++    LIBKCAL=""
+     DO_NOT_COMPILE=""
+ else
+     kde_htmldir=${datadir}/taskjuggler
+diff -Nur taskjuggler-2.4.1/configure.in taskjuggler-2.4.1-no-kdepim3/configure.in
+--- taskjuggler-2.4.1/configure.in	2008-05-06 15:04:55.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/configure.in	2008-06-09 14:34:46.000000000 +0200
+@@ -97,17 +97,8 @@
+     AC_PATH_KDE 
+ 
+     AC_SUBST(KDE_LIBS)
+-    dnl These libs are part of KDEPIM
+-    LIBKCAL="-lkcal"
+-    dnl Some distros split off a KDEPIM devel package most people
+-    dnl forget to install.
+-    KDE_CHECK_HEADERS(libkcal/calendarlocal.h libkcal/todo.h)
+-    if test "$ac_cv_header_libkcal_calendarlocal_h" = "no" -o \
+-            "$ac_cv_header_libkcal_todo_h" = "no" ; then
+-      AC_MSG_ERROR([KDEPIM header files no found. Please make sure
+-you have KDEPIM and the corresponding development packages
+-installed!])
+-    fi
++    echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist
++    LIBKCAL=""
+     DO_NOT_COMPILE=""
+ else
+     kde_htmldir=${datadir}/taskjuggler
+diff -Nur taskjuggler-2.4.1/configure.in.in taskjuggler-2.4.1-no-kdepim3/configure.in.in
+--- taskjuggler-2.4.1/configure.in.in	2008-05-06 15:04:54.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/configure.in.in	2008-06-09 14:33:37.000000000 +0200
+@@ -93,17 +93,8 @@
+     AC_PATH_KDE 
+ 
+     AC_SUBST(KDE_LIBS)
+-    dnl These libs are part of KDEPIM
+-    LIBKCAL="-lkcal"
+-    dnl Some distros split off a KDEPIM devel package most people
+-    dnl forget to install.
+-    KDE_CHECK_HEADERS(libkcal/calendarlocal.h libkcal/todo.h)
+-    if test "$ac_cv_header_libkcal_calendarlocal_h" = "no" -o \
+-            "$ac_cv_header_libkcal_todo_h" = "no" ; then
+-      AC_MSG_ERROR([KDEPIM header files no found. Please make sure
+-you have KDEPIM and the corresponding development packages
+-installed!])
+-    fi
++    echo "ICalReport.tjp" > TestSuite/Syntax/Correct/ignorelist
++    LIBKCAL=""
+     DO_NOT_COMPILE=""
+ else
+     kde_htmldir=${datadir}/taskjuggler
+diff -Nur taskjuggler-2.4.1/Examples/FirstProject/AccountingSoftware.tjp taskjuggler-2.4.1-no-kdepim3/Examples/FirstProject/AccountingSoftware.tjp
+--- taskjuggler-2.4.1/Examples/FirstProject/AccountingSoftware.tjp	2008-05-06 15:04:54.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/Examples/FirstProject/AccountingSoftware.tjp	2008-06-09 14:41:15.000000000 +0200
+@@ -308,4 +308,5 @@
+   scenarios plan, delayed
+ }
+ 
+-icalreport "Calendar.ics"
++# ICal output not supported without kdepim 3
++# icalreport "Calendar.ics"
+diff -Nur taskjuggler-2.4.1/taskjuggler/ICalReport.cpp taskjuggler-2.4.1-no-kdepim3/taskjuggler/ICalReport.cpp
+--- taskjuggler-2.4.1/taskjuggler/ICalReport.cpp	2008-05-06 15:04:54.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/taskjuggler/ICalReport.cpp	2008-06-09 14:36:51.000000000 +0200
+@@ -13,7 +13,7 @@
+ 
+ #include <config.h>
+ 
+-#ifdef HAVE_KDE
++#if 0
+ 
+ #include "ICalReport.h"
+ 
+diff -Nur taskjuggler-2.4.1/taskjuggler/ProjectFile.cpp taskjuggler-2.4.1-no-kdepim3/taskjuggler/ProjectFile.cpp
+--- taskjuggler-2.4.1/taskjuggler/ProjectFile.cpp	2008-05-06 15:04:54.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/taskjuggler/ProjectFile.cpp	2008-06-09 14:36:36.000000000 +0200
+@@ -42,7 +42,7 @@
+ #include "CSVResourceReport.h"
+ #include "CSVAccountReport.h"
+ #include "XMLReport.h"
+-#ifdef HAVE_KDE
++#if 0
+ #include "ICalReport.h"
+ #endif
+ #include "ExportReport.h"
+@@ -3213,8 +3213,8 @@
+ bool
+ ProjectFile::readICalTaskReport()
+ {
+-#ifndef HAVE_KDE
+-    errorMessage(i18n("The program was compiled without KDE support. "
++#if 1
++    errorMessage(i18n("The program was compiled without kdepim support. "
+                       "Therefore ICal support has been disabled."));
+     return false;
+ #else
+diff -Nur taskjuggler-2.4.1/TaskJugglerUI/kdepimmacros.h taskjuggler-2.4.1-no-kdepim3/TaskJugglerUI/kdepimmacros.h
+--- taskjuggler-2.4.1/TaskJugglerUI/kdepimmacros.h	1970-01-01 01:00:00.000000000 +0100
++++ taskjuggler-2.4.1-no-kdepim3/TaskJugglerUI/kdepimmacros.h	2008-06-09 14:51:33.000000000 +0200
+@@ -0,0 +1,35 @@
++/*
++    This file is part of libkdepim.
++
++    Copyright (c) 2002-2003 KDE Team
++
++    This library is free software; you can redistribute it and/or
++    modify it under the terms of the GNU Library General Public
++    License as published by the Free Software Foundation; either
++    version 2 of the License, or (at your option) any later version.
++
++    This library is distributed in the hope that it will be useful,
++    but WITHOUT ANY WARRANTY; without even the implied warranty of
++    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++    Library General Public License for more details.
++
++    You should have received a copy of the GNU Library General Public License
++    along with this library; see the file COPYING.LIB.  If not, write to
++    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++    Boston, MA 02110-1301, USA.
++*/
++
++// WARNING Don't add include guards here, they were removed on purpose
++
++#include <kdeversion.h>
++#include <kdemacros.h>
++
++#if KDE_IS_VERSION( 3,3,90 )
++/* life is great */
++#else
++/* workaround typo that breaks compilation with newer gcc */
++#undef KDE_EXPORT
++#define KDE_EXPORT
++#undef KDE_NO_EXPORT
++#define KDE_NO_EXPORT
++#endif
+diff -Nur taskjuggler-2.4.1/TaskJugglerUI/ReportManager.cpp taskjuggler-2.4.1-no-kdepim3/TaskJugglerUI/ReportManager.cpp
+--- taskjuggler-2.4.1/TaskJugglerUI/ReportManager.cpp	2008-05-06 15:04:54.000000000 +0200
++++ taskjuggler-2.4.1-no-kdepim3/TaskJugglerUI/ReportManager.cpp	2008-06-09 14:48:55.000000000 +0200
+@@ -31,7 +31,9 @@
+ 
+ #include "Project.h"
+ #include "HTMLReport.h"
++#if 0
+ #include "ICalReport.h"
++#endif
+ #include "CSVReport.h"
+ #include "XMLReport.h"
+ #include "ExportReport.h"
+@@ -146,11 +148,13 @@
+     xmlReports->setOpen(openReports.find(xmlReports->text(0)) !=
+                          openReports.end());
+ 
++#if 0
+     icalReports = new KListViewItem(browser, i18n("iCalendars"));
+     icalReports->setPixmap(0, KGlobal::iconLoader()->
+                            loadIcon("tj_ical_reports", KIcon::Small));
+     icalReports->setOpen(openReports.find(icalReports->text(0)) !=
+                          openReports.end());
++#endif
+ 
+     exportReports = new KListViewItem(browser, i18n("Export Reports"));
+     exportReports->setPixmap(0, KGlobal::iconLoader()->
+@@ -190,11 +194,13 @@
+             prefix = 3;
+             parent = xmlReports;
+         }
++#if 0
+         else if (strncmp(r->getType(), "ICal", 4) == 0)
+         {
+             prefix = 4;
+             parent = icalReports;
+         }
++#endif
+         else if (strncmp(r->getType(), "Export", 6) == 0)
+         {
+             prefix = 6;
+@@ -303,12 +309,14 @@
+             dynamic_cast<HTMLReport*>(mr->getProjectReport());
+         retVal = htmlReport->generate();
+     }
++#if 0
+     else if (strncmp(mr->getProjectReport()->getType(), "ICal", 4) == 0)
+     {
+         ICalReport* icalReport =
+             dynamic_cast<ICalReport*>(mr->getProjectReport());
+         retVal = icalReport->generate();
+     }
++#endif
+     else if (strncmp(mr->getProjectReport()->getType(), "XML", 3) == 0)
+     {
+         XMLReport* xmlReport =
+@@ -398,6 +406,7 @@
+         }
+         else if (strncmp(mr->getProjectReport()->getType(), "HTML", 4) == 0)
+             tjr = new TjHTMLReport(reportStack, this, mr->getProjectReport());
++#if 0
+         else if (strncmp(mr->getProjectReport()->getType(), "ICal", 4) == 0)
+         {
+             ICalReport* icalReport =
+@@ -417,6 +426,7 @@
+                 KRun::runURL(reportUrl, "text/calendar");
+             }
+         }
++#endif
+         else if (strncmp(mr->getProjectReport()->getType(), "Export", 6) == 0)
+         {
+             // Generate the report file
diff --git a/taskjuggler.spec b/taskjuggler.spec
index e20bc99..84f75fd 100644
--- a/taskjuggler.spec
+++ b/taskjuggler.spec
@@ -7,15 +7,14 @@ Group:         Applications/Productivity
 License:       GPL+
 URL:           http://www.taskjuggler.org
 Source0:       http://www.taskjuggler.org/download/%{name}-%{version}.tar.bz2
+# disable kdepim support (without disabling all of KDE support)
+Patch0:        taskjuggler-2.4.1-no-kdepim3.patch
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %if 0%{?fedora} < 10
 BuildRequires: kdepim-devel
-%define kde_support yes
 %else
-# maybe qt3-devel is enough?
-BuildRequires: kdelibs3-devel
-%define kde_support no
+%define nokdepim3 1
 %endif
 # need gettext for untranslated .po files
 Buildrequires: gettext
@@ -43,10 +42,18 @@ Libraries for TaskJuggler package.
 
 %prep
 %setup -q 
+%if 0%{?nokdepim3}
+%patch0 -p1 -b .no-kdepim3
+# timestamp magic to keep autotools from regenerating everything
+sleep 1
+touch acinclude.m4 configure.files configure.in subdirs
+sleep 1
+touch aclocal.m4 config.h.in configure Makefile.in stamp-h.in
+%endif
 
 %build
 [ -n "$QTDIR" ] || . %{_sysconfdir}/profile.d/qt.sh
-%configure --with-qt-includes=%{_libdir}/qt-3.3/include --with-qt-libraries=%{_libdir}/qt-3.3/lib --with-kde-support=%{kde_support} --disable-rpath
+%configure --with-qt-includes=%{_libdir}/qt-3.3/include --with-qt-libraries=%{_libdir}/qt-3.3/lib --with-kde-support=yes --disable-rpath
 # doc build fails with -j4 
 make
 
@@ -113,7 +120,7 @@ fi
 %{_libdir}/libtaskjuggler*
 
 %changelog
-* Sat Jun  7 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.4.1-3
+* Mon Jun  9 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 2.4.1-3
 - disable kdepim support on F10+, kdepim 3 no longer available
 
 * Tue May 20 2008 Ondrej Vasik <ovasik at redhat.com> - 2.4.1-2
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/taskjuggler.git/commit/?h=epel7&id=cc9e3bd36514b9ed907d5ed060394dbcabd3df4f


More information about the scm-commits mailing list