File: cross.patch

package info (click to toggle)
mah-jong 1.17.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,232 kB
  • sloc: ansic: 19,774; perl: 394; makefile: 263; sh: 124
file content (43 lines) | stat: -rw-r--r-- 1,909 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: Make pkg-config substitutable
 fix FTCBFS: uses the build architecture toolchain
Author: Helmut Grohne <helmut@subdivi.de>
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=901469;filename=mah-jong_1.11-2.1.debdiff;msg=5
Bug-Debian: https://bugs.debian.org/901469
Forwarded: not-needed
Reviewed-By: xiao sheng wen <atzlinux@sina.com>
Last-Update: 2025-09-10

---

--- mah-jong-1.17.2.orig/Makefile.in
+++ mah-jong-1.17.2/Makefile.in
@@ -71,6 +71,7 @@ MGW=/home/jcb/MinGW
 # late gccs (15 onwards) change the default language. xmj is
 # written in C99 with gnu extensions, so set this:
 CC = gcc -std=gnu99
+PKG_CONFIG ?= pkg-config
 
 # C debugging and optimization flags. 
 # In development, we turn on all reasonable warnings.
@@ -148,16 +149,16 @@ CC=i686-w64-mingw32-gcc
 EXTRA_INCLUDES=-I$(MGW)/include/glib-2.0 -I$(MGW)/include/gtk-3.0 -I$(MGW)/include/pango-1.0 -I$(MGW)/include/cairo -I$(MGW)/lib/glib-2.0/include -I$(MGW)/lib/gtk-3.0/include -I$(MGW)/include/gdk-pixbuf-2.0 -I$(MGW)/include/atk-1.0
 GUILIBS=-L$(MGW)/lib -lgtk-3 -lgdk-3 -lgdk_pixbuf-2.0 -lglib-2.0 -lgobject-2.0 -mwindows
 else
-# should be the same as unix, if it can find pkg-config
-EXTRA_INCLUDES=$(shell pkg-config --cflags gtk+-$(Gtk))
+# should be the same as unix, if it can find $(PKG_CONFIG)
+EXTRA_INCLUDES=$(shell $(PKG_CONFIG) --cflags gtk+-$(Gtk))
 # We also add the flag that makes xmj.exe be a GUI program
-GUILIBS=$(shell pkg-config --libs gtk+-$(Gtk)) -mwindows
+GUILIBS=$(shell $(PKG_CONFIG) --libs gtk+-$(Gtk)) -mwindows
 endif
 else
 # Not Windows. If gtk+ is properly installed, this is all that's needed.
 # except that gtk no longer pulls in -lm 
-EXTRA_INCLUDES=`pkg-config --cflags gtk+-$(Gtk)`
-GUILIBS=`pkg-config --libs gtk+-$(Gtk)` -lm
+EXTRA_INCLUDES=`$(PKG_CONFIG) --cflags gtk+-$(Gtk)`
+GUILIBS=`$(PKG_CONFIG) --libs gtk+-$(Gtk)` -lm
 endif
 
 # We use gcc to link as well