commit:     9358f8742ad37afb081cf1120df9cd92c4fc7759
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 21:07:20 2025 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 21:08:14 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9358f874

media-gfx/netgen: Fix build with jpeg

Closes: https://bugs.gentoo.org/947728
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 .../files/netgen-6.2.2406-link-against-jpeg.patch  | 30 ++++++++++++++++++++++
 media-gfx/netgen/netgen-6.2.2406.ebuild            |  1 +
 2 files changed, 31 insertions(+)

diff --git a/media-gfx/netgen/files/netgen-6.2.2406-link-against-jpeg.patch 
b/media-gfx/netgen/files/netgen-6.2.2406-link-against-jpeg.patch
new file mode 100644
index 000000000000..0460a1a6fefe
--- /dev/null
+++ b/media-gfx/netgen/files/netgen-6.2.2406-link-against-jpeg.patch
@@ -0,0 +1,30 @@
+From 3d82bf88360b9d032671a72a31cd9c351bf674f8 Mon Sep 17 00:00:00 2001
+From: Alexey Shvetsov <[email protected]>
+Date: Sun, 9 Feb 2025 23:56:10 +0300
+Subject: [PATCH] Patch to fix build with jpeg enabled
+
+Issue #210
+Bug https://bugs.gentoo.org/947728
+
+Signed-off-by: Alexey Shvetsov <[email protected]>
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9c54e30e..deb77192 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -432,6 +432,9 @@ if (USE_JPEG)
+     find_package(JPEG REQUIRED)
+     add_definitions(-DJPEGLIB)
+     include_directories(${JPEG_INCLUDE_DIR})
++    if(USE_GUI)
++      target_link_libraries(nggui INTERFACE ${JPEG_LIBRARIES})
++    endif(USE_GUI)
+ endif (USE_JPEG)
+ 
+ #######################################################################
+-- 
+2.48.1
+

diff --git a/media-gfx/netgen/netgen-6.2.2406.ebuild 
b/media-gfx/netgen/netgen-6.2.2406.ebuild
index 35c30b24ff1d..32925744f381 100644
--- a/media-gfx/netgen/netgen-6.2.2406.ebuild
+++ b/media-gfx/netgen/netgen-6.2.2406.ebuild
@@ -73,6 +73,7 @@ PATCHES=(
        "${FILESDIR}/${PN}-6.2.2406-find-libjpeg-turbo-library.patch"
        "${FILESDIR}/${PN}-6.2.2301-fix-nullptr-deref-in-archive.patch"
        "${FILESDIR}/${PN}-6.2.2406-encoding_h.patch"
+       "${FILESDIR}/${PN}-6.2.2406-link-against-jpeg.patch"
 )
 
 pkg_setup() {

Reply via email to