[SOLVED] Debhelper woes

Programming languages, Coding, executables, and scripting.
Post Reply
Message
Author
MultiplexLayout
Posts: 42
Joined: 2020-09-23 19:21
Has thanked: 5 times

[SOLVED] Debhelper woes

#1 Post by MultiplexLayout »

I am trying to package Yuzu and I have some questions
  • Is it possible to automate filling in the Build-depends field of control? In the same way as you can use ${shlibs:Depends} to fill the Depends field?
  • After dh_auto_install runs, the install prefix has directories bin/ lib/ include/ share/. I want to exclude the lib/ and include/ directory. I'm sure I've seen this done in a rules file with the -X and --exclude= option, but for me dh_auto_install just ignores it.
  • My toolchain necessitates using Clang, but dh_dwm crashes if you don't use DWARF-4. According to this bug report, you can force this with the "-gdwarf-4" flag. How do I do this in a cmake-based rules file? -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -gdwarf-4" doesn't work. Nor does passing this option to -DCMAKE_EXE_LINKER_FLAGS.
FWIW, here is what my rules file looks like:

Code: Select all

#!/usr/bin/make -f

CMAKE_OPTIONS := \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DYUZU_USE_QT_WEB_ENGINE=ON \
	-DYUZU_USE_EXTERNAL_SDL2=OFF \
	-DCMAKE_C_COMPILER=clang-14 \
	-DCMAKE_CXX_COMPILER=clang++-14 \
	-DYUZU_TESTS=OFF \
	-DYUZU_CHECK_SUBMODULES=OFF \
	-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS} -gdwarf-4"

%:
	dh $@


override_dh_auto_configure:
	mkdir obj-$(DEB_HOST_MULTIARCH) && cd obj-$(DEB_HOST_MULTIARCH) && cmake .. -GNinja $(CMAKE_OPTIONS)
	
override_dh_make:
	cd obj-$(DEB_HOST_MULTIARCH) && ninja

override_dh_auto_install:
	dh_auto_install -Xlib/cmake/xbyak/* -Xinclude/tsl/* -Xusr/include/xbyak/*  --
Last edited by MultiplexLayout on 2022-12-05 19:45, edited 1 time in total.

gusnan
Posts: 27
Joined: 2009-01-15 06:26

Re: Debhelper woes

#2 Post by gusnan »

MultiplexLayout wrote:My toolchain necessitates using Clang, but dh_dwm crashes if you don't use DWARF-4. According to this bug report, you can force this with the "-gdwarf-4" flag. How do I do this in a cmake-based rules file? -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -gdwarf-4" doesn't work. Nor does passing this option to -DCMAKE_EXE_LINKER_FLAGS.
What if you try something like this:

Code: Select all

DEB_CMAKE_OPTIONS ?= -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -gdwarf-4"
in your rules file?

MultiplexLayout
Posts: 42
Joined: 2020-09-23 19:21
Has thanked: 5 times

Re: Debhelper woes

#3 Post by MultiplexLayout »

gusnan wrote: 2022-12-03 00:00
MultiplexLayout wrote:My toolchain necessitates using Clang, but dh_dwm crashes if you don't use DWARF-4. According to this bug report, you can force this with the "-gdwarf-4" flag. How do I do this in a cmake-based rules file? -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -gdwarf-4" doesn't work. Nor does passing this option to -DCMAKE_EXE_LINKER_FLAGS.
What if you try something like this:

Code: Select all

DEB_CMAKE_OPTIONS ?= -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -gdwarf-4"
in your rules file?
Thank you for replying.
Unfortunately that didn't change anything. I fixed it eventually by adding both -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} -gdwarf-4" and -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -gdwarf-4" to my cmake options. Marking this as solved anyway.

Post Reply