Source: virtualjaguar
Version: 2.1.3-2
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

virtualjaguar is a little difficult for cross compilation. While there
is explicit upstream support for it, it seems that this is limited to
windows hosts. This patch is not going to solve it all, but a major
sticking issue is the hard coding of the build architecture pkg-config.
This is done both in jaguarcore.mk and in virtualjaguar.pro. For
jaguarcore.mk I propose using the standard variable PKG_CONFIG and for
virtualjaguar.pro I propose using the standard pkg-config support
provided by qmake. On the qmake side, things become quite a little
simpler. Please consider applying the attached patch and close this bug
when doing so.

Helmut
--- virtualjaguar-2.1.3.orig/jaguarcore.mak
+++ virtualjaguar-2.1.3/jaguarcore.mak
@@ -27,8 +27,14 @@
 endif
 endif
 
+CC      := $(CROSS)gcc
+LD      := $(CROSS)gcc
+AR      := $(CROSS)ar
+PKG_CONFIG := $(CROSS)pkg-config
+ARFLAGS := -rs
+
 # Set vars for libcdio
-ifneq "$(shell pkg-config --silence-errors --libs libcdio)" ""
+ifneq "$(shell $(PKG_CONFIG) --silence-errors --libs libcdio)" ""
 HAVECDIO := -DHAVE_LIB_CDIO
 #This is the wrong place for this...
 #CDIOLIB  := -lcdio
@@ -37,11 +43,6 @@
 #CDIOLIB  :=
 endif
 
-CC      := $(CROSS)gcc
-LD      := $(CROSS)gcc
-AR      := $(CROSS)ar
-ARFLAGS := -rs
-
 SDL_CFLAGS = `$(CROSS)sdl-config --cflags`
 DEFINES = -D$(SYSTYPE) $(HAVECDIO)
 GCC_DEPS = -MMD
--- virtualjaguar-2.1.3.orig/Makefile
+++ virtualjaguar-2.1.3/Makefile
@@ -61,7 +61,7 @@
 
 virtualjaguar: sources libs makefile-qt
 	@echo -e "\033[01;33m***\033[00;32m Making Virtual Jaguar GUI...\033[00m"
-	$(Q)$(MAKE) -f makefile-qt CROSS=$(CROSS) V="$(V)" CDIO=libcdio
+	$(Q)$(MAKE) -f makefile-qt CROSS=$(CROSS) V="$(V)"
 
 makefile-qt: virtualjaguar.pro
 	@echo -e "\033[01;33m***\033[00;32m Creating Qt makefile...\033[00m"
--- virtualjaguar-2.1.3.orig/virtualjaguar.pro
+++ virtualjaguar-2.1.3/virtualjaguar.pro
@@ -36,11 +36,8 @@
 macx { LIBS += `sdl-config --static-libs` }
 else { LIBS += `$(CROSS)sdl-config --libs` }
 
-# libCDIO (may or may not be cross compatible, so we have this for now, just in
-# case we need it... (N.B.: the $(CDIO) is needed because under MXE, qmake
-# changes libcdio to -lcdio for some stupid reason...)
-macx { LIBS += `pkg-config --silence-errors --libs libcdio` }
-else { LIBS += `$(CROSS)pkg-config --silence-errors --libs $(CDIO)` }
+CONFIG += link_pkgconfig
+PKGCONFIG += libcdio
 
 # Icon on Win32, Mac
 #win32 { LIBS += res/vj-ico.o }

Reply via email to