Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
@ 2021-07-15 22:04 joshuakraemer
  2021-07-15 22:07 ` [PR PATCH] [Updated] " joshuakraemer
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: joshuakraemer @ 2021-07-15 22:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

There is a new pull request by joshuakraemer against master on the void-packages repository

https://github.com/joshuakraemer/void-packages cmake-build-style
https://github.com/void-linux/void-packages/pull/31990

Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds `-DNDEBUG` with build types `Release`, `MinSizeRel` and `RelWithDebInfo` (see https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake#L57). `NDEBUG` disables `assert()`, which can improve performance.

A patch file from https://github.com/void-linux/void-packages/pull/31990.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-build-style-31990.patch --]
[-- Type: text/x-diff, Size: 4761 bytes --]

From e5c1986aa265eeb08daad54f077a90dd37f2db4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joshua=20Kr=C3=A4mer?= <joshua@kraemer.link>
Date: Thu, 20 May 2021 16:57:20 +0200
Subject: [PATCH 1/3] New package: dosbox-staging-0.77.0

---
 srcpkgs/dosbox-staging/template | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 srcpkgs/dosbox-staging/template

diff --git a/srcpkgs/dosbox-staging/template b/srcpkgs/dosbox-staging/template
new file mode 100644
index 000000000000..9ae75ab63d46
--- /dev/null
+++ b/srcpkgs/dosbox-staging/template
@@ -0,0 +1,14 @@
+# Template file for 'dosbox-staging'
+pkgname=dosbox-staging
+version=0.77.0
+revision=1
+build_style=meson
+hostmakedepends="pkg-config ccache"
+makedepends="alsa-lib-devel libpng-devel SDL2-devel SDL2_net-devel opusfile-devel fluidsynth-devel libmt32emu-devel libatomic-devel"
+short_desc="DOS/x86 emulator focusing on ease of use"
+maintainer="Joshua Krämer <joshua@kraemer.link>"
+license="GPL-2.0-or-later"
+homepage="https://dosbox-staging.github.io"
+distfiles="https://github.com/dosbox-staging/dosbox-staging/archive/v${version}.tar.gz"
+checksum=85e1739f5dfd7d96b752b2b0e12aad6f95c7770b47fcdaf978d4128d7890d986
+conflicts="dosbox"

From 6e4551ab68b89adaf53844fe78b8611862455e3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joshua=20Kr=C3=A4mer?= <joshua@kraemer.link>
Date: Thu, 20 May 2021 23:04:49 +0200
Subject: [PATCH 2/3] New package: libmt32emu-2.5.1

---
 common/shlibs               |  1 +
 srcpkgs/libmt32emu-devel    |  1 +
 srcpkgs/libmt32emu/template | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 34 insertions(+)
 create mode 120000 srcpkgs/libmt32emu-devel
 create mode 100644 srcpkgs/libmt32emu/template

diff --git a/common/shlibs b/common/shlibs
index 9df122c0edfe..5c328cc05b25 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4018,3 +4018,4 @@ libXcompshad.so.3 nx-libs-3.5.99.24_1
 libNX_X11.so.6 nx-libs-3.5.99.24_1
 librnnoise.so.0 rnnoise-0.4.1_1
 liblhasa.so.0 lhasa-0.3.1_2
+libmt32emu.so.2 libmt32emu-2.5.1_1
diff --git a/srcpkgs/libmt32emu-devel b/srcpkgs/libmt32emu-devel
new file mode 120000
index 000000000000..b427be42b324
--- /dev/null
+++ b/srcpkgs/libmt32emu-devel
@@ -0,0 +1 @@
+libmt32emu
\ No newline at end of file
diff --git a/srcpkgs/libmt32emu/template b/srcpkgs/libmt32emu/template
new file mode 100644
index 000000000000..1b66f2a2fe27
--- /dev/null
+++ b/srcpkgs/libmt32emu/template
@@ -0,0 +1,32 @@
+# Template file for 'libmt32emu'
+pkgname=libmt32emu
+version=2.5.1
+revision=1
+_version_string=${version//./_}
+wrksrc=munt-libmt32emu_${_version_string}
+build_wrksrc=mt32emu
+build_style=cmake
+makedepends="$(vopt_if libsoxr libsoxr-devel) $(vopt_if libsamplerate libsamplerate-devel)"
+short_desc="Library to emulate Roland MT-32, CM-32L and LAPC-I synthesizer modules"
+maintainer="Joshua Krämer <joshua@kraemer.link>"
+license="LGPL-2.1-or-later"
+homepage="http://munt.sourceforge.net"
+distfiles="https://github.com/munt/munt/archive/libmt32emu_${_version_string}.tar.gz"
+checksum=684988ab4d2b103554d9a38ad556cebc3ebc28d1d8fbb49fb4808ec9c80a2bf4
+
+build_options="libsoxr libsamplerate"
+desc_option_libsoxr="Use libsoxr for sample rate conversion"
+desc_option_libsamplerate="Use libsamplerate for sample rate conversion"
+build_options_default="libsoxr"
+vopt_conflict libsoxr libsamplerate
+if [ "$build_option_libsoxr" -o "$build_option_libsamplerate" ]; then configure_args+=" -Dlibmt32emu_WITH_INTERNAL_RESAMPLER=off"; fi
+
+libmt32emu-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision} $(vopt_if libsoxr libsoxr-devel) $(vopt_if libsamplerate libsamplerate-devel)"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+		vmove usr/lib/pkgconfig
+	}
+}

From 5357c3a9939fedf2337ebbeb86d7939c127f3794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joshua=20Kr=C3=A4mer?= <joshua@kraemer.link>
Date: Thu, 15 Jul 2021 23:56:25 +0200
Subject: [PATCH 3/3] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style

CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo.
---
 common/build-style/cmake.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index a7627e7dcf21..c38d76883827 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -64,7 +64,7 @@ _EOF
 
 	export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
 	# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
-	CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
+	CFLAGS="${CFLAGS/ -pipe / } -DNDEBUG" CXXFLAGS="${CXXFLAGS/ -pipe / } -DNDEBUG" \
 		cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
 
 	# Replace -isystem with -I

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PR PATCH] [Updated] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
@ 2021-07-15 22:07 ` joshuakraemer
  2021-07-15 22:18 ` q66
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: joshuakraemer @ 2021-07-15 22:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

There is an updated pull request by joshuakraemer against master on the void-packages repository

https://github.com/joshuakraemer/void-packages cmake-build-style
https://github.com/void-linux/void-packages/pull/31990

Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds `-DNDEBUG` with build types `Release`, `MinSizeRel` and `RelWithDebInfo` (see https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake#L57). `NDEBUG` disables `assert()`, which can improve performance.

A patch file from https://github.com/void-linux/void-packages/pull/31990.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-build-style-31990.patch --]
[-- Type: text/x-diff, Size: 987 bytes --]

From adc2a109d7db875007bf5645bdc3d7d372cffd57 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joshua=20Kr=C3=A4mer?= <joshua@kraemer.link>
Date: Thu, 15 Jul 2021 23:56:25 +0200
Subject: [PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style

CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo.
---
 common/build-style/cmake.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index a7627e7dcf21..c38d76883827 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -64,7 +64,7 @@ _EOF
 
 	export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
 	# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
-	CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
+	CFLAGS="${CFLAGS/ -pipe / } -DNDEBUG" CXXFLAGS="${CXXFLAGS/ -pipe / } -DNDEBUG" \
 		cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
 
 	# Replace -isystem with -I

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
  2021-07-15 22:07 ` [PR PATCH] [Updated] " joshuakraemer
@ 2021-07-15 22:18 ` q66
  2021-07-15 22:19 ` q66
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: q66 @ 2021-07-15 22:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/31990#issuecomment-881047345

Comment:
should put them at the beginning rather than the end so that provided C(XX)FLAGS can override it

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
  2021-07-15 22:07 ` [PR PATCH] [Updated] " joshuakraemer
  2021-07-15 22:18 ` q66
@ 2021-07-15 22:19 ` q66
  2021-07-16 15:05 ` [PR PATCH] [Updated] " joshuakraemer
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: q66 @ 2021-07-15 22:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 164 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/31990#issuecomment-881047588

Comment:
also do the same for FFLAGS

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PR PATCH] [Updated] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
                   ` (2 preceding siblings ...)
  2021-07-15 22:19 ` q66
@ 2021-07-16 15:05 ` joshuakraemer
  2021-07-16 15:10 ` joshuakraemer
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: joshuakraemer @ 2021-07-16 15:05 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

There is an updated pull request by joshuakraemer against master on the void-packages repository

https://github.com/joshuakraemer/void-packages cmake-build-style
https://github.com/void-linux/void-packages/pull/31990

Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
CMake adds `-DNDEBUG` with build types `Release`, `MinSizeRel` and `RelWithDebInfo` (see https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake#L57). `NDEBUG` disables `assert()`, which can improve performance.

A patch file from https://github.com/void-linux/void-packages/pull/31990.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-cmake-build-style-31990.patch --]
[-- Type: text/x-diff, Size: 1163 bytes --]

From 85d8a78dce4ff0346dadf37969b4e58e128249ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joshua=20Kr=C3=A4mer?= <joshua@kraemer.link>
Date: Thu, 15 Jul 2021 23:56:25 +0200
Subject: [PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style

CMake adds -DNDEBUG with build types Release, MinSizeRel and RelWithDebInfo.
NDEBUG disables assert(), which can improve performance.
---
 common/build-style/cmake.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh
index a7627e7dcf21..401dabad31c8 100644
--- a/common/build-style/cmake.sh
+++ b/common/build-style/cmake.sh
@@ -63,8 +63,8 @@ _EOF
 	cmake_args+=" -DCMAKE_INSTALL_SBINDIR=bin"
 
 	export CMAKE_GENERATOR="${CMAKE_GENERATOR:-Ninja}"
-	# Override flags: https://gitlab.kitware.com/cmake/cmake/issues/19590
-	CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \
+	# Remove -pipe: https://gitlab.kitware.com/cmake/cmake/issues/19590
+	CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" \
 		cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc}
 
 	# Replace -isystem with -I

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
                   ` (3 preceding siblings ...)
  2021-07-16 15:05 ` [PR PATCH] [Updated] " joshuakraemer
@ 2021-07-16 15:10 ` joshuakraemer
  2021-07-16 17:48 ` q66
  2021-07-16 17:48 ` [PR PATCH] [Merged]: " q66
  6 siblings, 0 replies; 8+ messages in thread
From: joshuakraemer @ 2021-07-16 15:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

New comment by joshuakraemer on void-packages repository

https://github.com/void-linux/void-packages/pull/31990#issuecomment-881520796

Comment:
@q66, thank you for your comments. I have moved `-DNDEBUG` to the beginning.

What do you mean regarding `FFLAGS`? `-DNDEBUG` is not used with Fortran, and CMake does not add anything else to `FFLAGS` (see https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU-Fortran.cmake#L20).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
                   ` (4 preceding siblings ...)
  2021-07-16 15:10 ` joshuakraemer
@ 2021-07-16 17:48 ` q66
  2021-07-16 17:48 ` [PR PATCH] [Merged]: " q66
  6 siblings, 0 replies; 8+ messages in thread
From: q66 @ 2021-07-16 17:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/31990#issuecomment-881615492

Comment:
ah, okay then (i figured it would be the same)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PR PATCH] [Merged]: Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
  2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
                   ` (5 preceding siblings ...)
  2021-07-16 17:48 ` q66
@ 2021-07-16 17:48 ` q66
  6 siblings, 0 replies; 8+ messages in thread
From: q66 @ 2021-07-16 17:48 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]

There's a merged pull request on the void-packages repository

Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style
https://github.com/void-linux/void-packages/pull/31990

Description:
CMake adds `-DNDEBUG` with build types `Release`, `MinSizeRel` and `RelWithDebInfo` (see https://github.com/Kitware/CMake/blob/master/Modules/Compiler/GNU.cmake#L57). `NDEBUG` disables `assert()`, which can improve performance.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-16 17:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 22:04 [PR PATCH] Add -DNDEBUG to CFLAGS and CXXFLAGS in CMake build style joshuakraemer
2021-07-15 22:07 ` [PR PATCH] [Updated] " joshuakraemer
2021-07-15 22:18 ` q66
2021-07-15 22:19 ` q66
2021-07-16 15:05 ` [PR PATCH] [Updated] " joshuakraemer
2021-07-16 15:10 ` joshuakraemer
2021-07-16 17:48 ` q66
2021-07-16 17:48 ` [PR PATCH] [Merged]: " q66

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).