mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-09 00:07:57 +03:00
media-gfx/arss: Fix build w/ cmake-4, drop CMAKE_IN_SOURCE_BUILD
Define CMAKE_USE_DIR instead setting S to subdir. Use fftw shipped cmake config module. Closes: https://bugs.gentoo.org/951899 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
parent
57b8b704f9
commit
e628df9679
@ -1,16 +1,16 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
CMAKE_IN_SOURCE_BUILD="true"
|
||||
MY_P="${P}-src"
|
||||
inherit cmake flag-o-matic
|
||||
|
||||
DESCRIPTION="Analysis & Resynthesis Sound Spectrograph"
|
||||
HOMEPAGE="https://arss.sourceforge.net"
|
||||
SRC_URI="https://downloads.sourceforge.net/${PN}/${MY_P}.tar.gz"
|
||||
S="${WORKDIR}/${MY_P}/src"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
CMAKE_USE_DIR="${S}/src"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
@ -19,7 +19,10 @@ KEYWORDS="~amd64"
|
||||
DEPEND="sci-libs/fftw:3.0="
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${P}-fno-common.patch
|
||||
"${FILESDIR}"/${P}-cmake4.patch
|
||||
)
|
||||
|
||||
DOCS=( ../AUTHORS ../ChangeLog )
|
||||
|
||||
|
||||
48
media-gfx/arss/files/arss-0.2.3-cmake4.patch
Normal file
48
media-gfx/arss/files/arss-0.2.3-cmake4.patch
Normal file
@ -0,0 +1,48 @@
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -1,38 +1,16 @@
|
||||
+cmake_minimum_required(VERSION 3.31)
|
||||
+
|
||||
project (arss C)
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
add_executable (arss arss.c dsp.c util.c image_io.c sound_io.c)
|
||||
|
||||
|
||||
SET (CMAKE_BUILD_TYPE Release)
|
||||
|
||||
-# look for the FFTW library
|
||||
-FIND_PATH (FFTW3_INCLUDE_DIR fftw3.h PATHS /usr/local/include /usr/include /sw/include)
|
||||
-FIND_LIBRARY (FFTW3_LIBRARY fftw3 fftw PATHS /usr/local/lib /usr/lib /lib /sw/lib)
|
||||
-
|
||||
-IF (FFTW3_INCLUDE_DIR AND FFTW3_LIBRARY)
|
||||
- SET (HAVE_FFTW3 TRUE)
|
||||
-ELSE (FFTW3_INCLUDE_DIR AND FFTW3_LIBRARY)
|
||||
- IF (NOT FFTW3_FIND_QUIETLY)
|
||||
- IF (NOT FFTW3_INCLUDE_DIR)
|
||||
- MESSAGE (STATUS "Unable to find FFTW3 header files!")
|
||||
- ENDIF (NOT FFTW3_INCLUDE_DIR)
|
||||
- IF (NOT FFTW3_LIBRARY)
|
||||
- MESSAGE (STATUS "Unable to find FFTW3 library files!")
|
||||
- ENDIF (NOT FFTW3_LIBRARY)
|
||||
- ENDIF (NOT FFTW3_FIND_QUIETLY)
|
||||
-ENDIF (FFTW3_INCLUDE_DIR AND FFTW3_LIBRARY)
|
||||
-
|
||||
-IF (HAVE_FFTW3)
|
||||
- IF (NOT FFTW3_FIND_QUIETLY)
|
||||
- MESSAGE (STATUS "Found components for FFTW3")
|
||||
- MESSAGE (STATUS "FFTW3_INCLUDE_DIR = ${FFTW3_INCLUDE_DIR}")
|
||||
- MESSAGE (STATUS "FFTW3_LIBRARY = ${FFTW3_LIBRARY}")
|
||||
- ENDIF (NOT FFTW3_FIND_QUIETLY)
|
||||
-ELSE (HAVE_FFTW3)
|
||||
- IF (FFTW3_FIND_REQUIRED)
|
||||
- MESSAGE (FATAL_ERROR "Could not find FFTW3!")
|
||||
- ENDIF (FFTW3_FIND_REQUIRED)
|
||||
-ENDIF (HAVE_FFTW3)
|
||||
+find_package(FFTW3 CONFIG REQUIRED)
|
||||
|
||||
TARGET_LINK_LIBRARIES (arss fftw3 m)
|
||||
|
||||
-INSTALL(PROGRAMS arss DESTINATION bin)
|
||||
+INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/arss DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
@ -1,5 +1,5 @@
|
||||
--- a/arss.c
|
||||
+++ b/arss.c
|
||||
--- a/src/arss.c
|
||||
+++ b/src/arss.c
|
||||
@@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*
|
||||
|
||||
char *version = "0.2.3";
|
||||
@ -8,8 +8,8 @@
|
||||
|
||||
#define MSG_NUMBER_EXPECTED "A number is expected after %s\nExiting with error.\n"
|
||||
|
||||
--- a/dsp.c
|
||||
+++ b/dsp.c
|
||||
--- a/src/dsp.c
|
||||
+++ b/src/dsp.c
|
||||
@@ -1,5 +1,12 @@
|
||||
#include "dsp.h"
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
void fft(double *in, double *out, int32_t N, uint8_t method)
|
||||
{
|
||||
/* method :
|
||||
--- a/dsp.h
|
||||
+++ b/dsp.h
|
||||
--- a/src/dsp.h
|
||||
+++ b/src/dsp.h
|
||||
@@ -17,13 +17,13 @@
|
||||
#define LOOP_SIZE_SEC_D 10.0
|
||||
#define BMSQ_LUT_SIZE_D 16000
|
||||
@ -44,8 +44,8 @@
|
||||
|
||||
extern void fft(double *in, double *out, int32_t N, uint8_t method);
|
||||
extern void normi(double **s, int32_t xs, int32_t ys, double ratio);
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
--- a/src/util.c
|
||||
+++ b/src/util.c
|
||||
@@ -1,5 +1,7 @@
|
||||
#include "util.h"
|
||||
|
||||
@ -54,8 +54,8 @@
|
||||
void win_return()
|
||||
{
|
||||
#ifdef WIN32
|
||||
--- a/util.h
|
||||
+++ b/util.h
|
||||
--- a/src/util.h
|
||||
+++ b/src/util.h
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "dsp.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user