LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0001-quick-hack-to-get-it-compiling-on-openSUSE.patch of Package kpie (Project home:aspiers)

From 1ab9db36e0dab59d560e9f4b432c0aae194f20c6 Mon Sep 17 00:00:00 2001
From: Adam Spiers <kpie@adamspiers.org>
Date: Mon, 9 Nov 2015 13:56:01 +0000
Subject: [PATCH] quick hack to get it compiling on openSUSE

This is not a real solution; it should probably use autoconf.
---
 Makefile  | 13 ++++++++++---
 README.md | 15 ++++++++++-----
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index eab0c35..4b938d2 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,9 @@ endif
 ifeq ($(UNAME),Darwin)
 	LVER=lua #(use lua-52)
 endif
+ifeq ($(UNAME),Linux)
+	LVER=lua
+endif
 
 
 #
@@ -42,7 +45,9 @@ LINKER=$(CC) -o
 CFLAGS=-DVERSION=$(VERSION)
 #CFLAGS+=$(shell dpkg-buildflags --get CFLAGS)
 CFLAGS+=-pedantic -std=c99 -Wall -Wextra
-CFLAGS+=$(shell pkg-config --cflags libwnck-1.0) $(shell pkg-config --cflags ${LVER})
+CFLAGS+=$(shell pkg-config --cflags gdk-3.0)
+CFLAGS+=$(shell pkg-config --cflags libwnck-1.0)
+CFLAGS+=$(shell pkg-config --cflags ${LVER})
 
 
 #
@@ -51,8 +56,10 @@ CFLAGS+=$(shell pkg-config --cflags libwnck-1.0) $(shell pkg-config --cflags ${L
 #  1.  Add Debian hardening flags.
 #  2.  Add libwnck + lua5.1
 #
-LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
-LDFLAGS+=$(shell pkg-config --libs libwnck-1.0) $(shell pkg-config --libs ${LVER})
+#LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
+LDFLAGS+=$(shell pkg-config --libs gdk-3.0)
+LDFLAGS+=$(shell pkg-config --libs libwnck-1.0)
+LDFLAGS+=$(shell pkg-config --libs ${LVER})
 LDFLAGS+=-lX11
 
 
diff --git a/README.md b/README.md
index 33f6885..6a80018 100644
--- a/README.md
+++ b/README.md
@@ -96,14 +96,19 @@ You can install binary packages for Debian GNU/Linux from the authors repository
 * http://packages.steve.org.uk/kpie/
    * The package will also add an entry to your system-menu at "`System Tools | Preferences | Startup Applications`"
 
-If you prefer to build from source you can do so providing you have the dependencies installed.  Beyond the necessities, a compiler and `make`, you'll need:
+If you prefer to build from source you can do so providing you have the dependencies installed.  Beyond the necessities, a compiler and `make`, you'll need development files for:
 
-* `libwnck-dev`
-* `liblua5.1-0-dev`
+* `libwnck-1.0`
+* `liblua5.1`
+* `libgdk`
 
-Upon a Debian GNU/Linux system these may be installed via:
+On a Debian GNU/Linux system these may be installed via:
 
-      sudo apt-get install libwnck-dev liblua5.1-0-dev
+    sudo apt-get install libwnck-dev liblua5.1-0-dev
+
+On an openSUSE 13.2 system these may be installed via:
+
+    sudo zypper install libwnck2-devel lua51-devel gtk3-devel
 
 With the dependencies in-place you should be able to compile the binary by simply running `make`.
 
-- 
2.1.2.330.g565301e