LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Error when compiling gtk-qt-engine (https://www.linuxquestions.org/questions/slackware-14/error-when-compiling-gtk-qt-engine-4175428290/)

dsplayer14 09-20-2012 06:55 PM

Error when compiling gtk-qt-engine
 
Finally got around to installing Slackware on my desktop. Gone well so far, but I ran into my first problem! I'm not a big fan of the GTK2 look on all my applications, so I am trying to install gtk-qt-engine using sbopkg. Well, I get this error:
Code:

Ignoring potentially dangerous file name /tmp/SBo/gtk-qt-engine/src/qt_theme_draw.c
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur /tmp/SBo/gtk-qt-engine.orig/src/qt_theme_draw.c /tmp/SBo/gtk-qt-engine/src/qt_theme_draw.c
|--- /tmp/SBo/gtk-qt-engine.orig/src/qt_theme_draw.c    2008-03-11 01:30:19.000000000 +0000
|+++ /tmp/SBo/gtk-qt-engine/src/qt_theme_draw.c 2009-07-11 14:33:46.000000000 +0000
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored

gtk-qt-engine:
Would you like to continue processing the rest of the
build queue or would you like to abort?  If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.

Beats me.

Woodsman 09-20-2012 07:36 PM

Notice this line in the build script:

# Patch the source so it won't break while building
patch -p0 < $CWD/include.patch

Return to the slackbuilds,org web site and download the patch. :)

http://slackbuilds.org/repository/13...gtk-qt-engine/

Patch:

http://slackbuilds.org/slackbuilds/1.../include.patch

dsplayer14 09-20-2012 07:40 PM

Would have never guessed to look inside the actual script...
Well, where do I put this patch? In the directory where the slackbuild is?

Woodsman 09-20-2012 11:22 PM

Yes, download and store to the same directory as the build script and tarball sources. :)

bormant 09-21-2012 04:20 AM

Quote:

Ignoring potentially dangerous file name
Since patch-2.7 ignores full paths patch and SlackBuild needs some edit.
Before:
Code:

diff -Naur /tmp/SBo/gtk-qt-engine.orig/src/qt_theme_draw.c /tmp/SBo/gtk-qt-engine/src/qt_theme_draw.c
--- /tmp/SBo/gtk-qt-engine.orig/src/qt_theme_draw.c        2008-03-11 01:30:19.000000000 +0000
+++ /tmp/SBo/gtk-qt-engine/src/qt_theme_draw.c        2009-07-11 14:33:46.000000000 +0000

Code:

# Patch the source so it won't break while building
patch -p0 < $CWD/include.patch


After:
Code:

diff -Naur gtk-qt-engine.orig/src/qt_theme_draw.c gtk-qt-engine/src/qt_theme_draw.c
--- gtk-qt-engine.orig/src/qt_theme_draw.c        2008-03-11 01:30:19.000000000 +0000
+++ gtk-qt-engine/src/qt_theme_draw.c        2009-07-11 14:33:46.000000000 +0000

Code:

# Patch the source so it won't break while building
patch -p1 < $CWD/include.patch


foobarz 09-21-2012 03:48 PM

Maybe try this in the SlackBuild:
Code:

# Patch the source so it won't break while building
PATCHFILE=$CWD/include.patch
( cd /tmp/SBo/gtk-qt-engine/src && patch -p0 < $PATCHFILE )

Maybe try this include.patch replacement:
Code:

--- qt_theme_draw.c-orig        2012-09-19 22:28:33.713964000 +0700
+++ qt_theme_draw.c        2012-09-19 22:29:10.228508000 +0700
@@ -19,11 +19,12 @@
  ***************************************************************************/
 
 #include <math.h>
+#include <stdlib.h>
 #include <string.h>
 #include <gtk/gtkprogressbar.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
-#include <glib/glist.h>
+#include <glib.h>
 
 #ifdef HAVE_BONOBO
 #include <libbonobo.h>


foobarz 09-21-2012 03:55 PM

The recent patch*.txz package no longer allows absolute file names of the file to patch, if i understand the changelog about it correctly. The other problem is the glist.h include is an error.

dsplayer14 09-22-2012 07:37 AM

Quote:

Originally Posted by foobarz (Post 4786137)
Maybe try this in the SlackBuild:
Code:

# Patch the source so it won't break while building
PATCHFILE=$CWD/include.patch
( cd /tmp/SBo/gtk-qt-engine/src && patch -p0 < $PATCHFILE )

Maybe try this include.patch replacement:
Code:

--- qt_theme_draw.c-orig        2012-09-19 22:28:33.713964000 +0700
+++ qt_theme_draw.c        2012-09-19 22:29:10.228508000 +0700
@@ -19,11 +19,12 @@
  ***************************************************************************/
 
 #include <math.h>
+#include <stdlib.h>
 #include <string.h>
 #include <gtk/gtkprogressbar.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
-#include <glib/glist.h>
+#include <glib.h>
 
 #ifdef HAVE_BONOBO
 #include <libbonobo.h>


This solved my problem! Thank you very much foobarz!


All times are GMT -5. The time now is 08:47 PM.