mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-29 11:38:52 +02:00
81
media-sound/cmus/cmus-2.7.1.recipe
Normal file
81
media-sound/cmus/cmus-2.7.1.recipe
Normal file
@@ -0,0 +1,81 @@
|
||||
SUMMARY="A Console Based Audio Player"
|
||||
DESCRIPTION="
|
||||
cmus (C* MUsic Player) is a small, fast and powerful console audio player \
|
||||
which supports most major audio formats. Various features include gapless \
|
||||
playback, ReplayGain support, MP3 and Ogg streaming, live filtering, instant \
|
||||
startup, customizable key-bindings, and vi-style default key-bindings."
|
||||
HOMEPAGE="https://cmus.github.io/"
|
||||
COPYRIGHT="2005-2015 The cmus Project"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/cmus/cmus/archive/v2.7.1.tar.gz"
|
||||
CHECKSUM_SHA256="8179a7a843d257ddb585f4c65599844bc0e516fe85e97f6f87a7ceade4eb5165"
|
||||
PATCHES="cmus-2.7.1-gcc2.patch"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 ?x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
cmus$secondaryArchSuffix = $portVersion
|
||||
cmd:cmus$secondaryArchSuffix = $portVersion
|
||||
cmd:cmus_remote$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libncurses$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libcddb$secondaryArchSuffix
|
||||
lib:libFLAC$secondaryArchSuffix
|
||||
lib:libmad$secondaryArchSuffix
|
||||
lib:libmodplug$secondaryArchSuffix
|
||||
lib:libmpcdec$secondaryArchSuffix
|
||||
lib:libvorbis$secondaryArchSuffix
|
||||
lib:libmp4v2$secondaryArchSuffix
|
||||
lib:libfaad$secondaryArchSuffix
|
||||
lib:libavformat$secondaryArchSuffix
|
||||
lib:libsamplerate$secondaryArchSuffix
|
||||
lib:libao$secondaryArchSuffix >= 1.1.0
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libncurses$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libcddb$secondaryArchSuffix
|
||||
devel:libFLAC$secondaryArchSuffix
|
||||
devel:libmad$secondaryArchSuffix
|
||||
devel:libmodplug$secondaryArchSuffix
|
||||
devel:libmpcdec$secondaryArchSuffix
|
||||
devel:libvorbis$secondaryArchSuffix
|
||||
devel:libmp4v2$secondaryArchSuffix
|
||||
devel:libfaad$secondaryArchSuffix
|
||||
devel:libavformat$secondaryArchSuffix
|
||||
devel:libsamplerate$secondaryArchSuffix
|
||||
devel:libao$secondaryArchSuffix >= 1.1.0
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc${secondaryArchSuffix}
|
||||
cmd:ld${secondaryArchSuffix}
|
||||
cmd:make
|
||||
cmd:pkg_config${secondaryArchSuffix}
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# not an autotools configure
|
||||
./configure \
|
||||
prefix=$prefix \
|
||||
bindir=$binDir \
|
||||
datadir=$dataDir \
|
||||
libdir=$libDir \
|
||||
mandir=$manDir \
|
||||
exampledir=$docDir \
|
||||
LDFLAGS=-lnetwork
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
}
|
||||
116
media-sound/cmus/patches/cmus-2.7.1-gcc2.patch
Normal file
116
media-sound/cmus/patches/cmus-2.7.1-gcc2.patch
Normal file
@@ -0,0 +1,116 @@
|
||||
diff --git a/Makefile "b/Makefile"
|
||||
index ed15791..2043f32 100644
|
||||
--- a/Makefile
|
||||
+++ "b/Makefile"
|
||||
@@ -21,7 +21,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||
FFMPEG_CFLAGS += $(shell pkg-config --cflags libswresample)
|
||||
FFMPEG_LIBS += $(shell pkg-config --libs libswresample)
|
||||
|
||||
-CMUS_LIBS = $(PTHREAD_LIBS) $(NCURSES_LIBS) $(ICONV_LIBS) $(DL_LIBS) $(DISCID_LIBS) $(CUE_LIBS) -lm $(COMPAT_LIBS)
|
||||
+CMUS_LIBS = $(PTHREAD_LIBS) $(NCURSES_LIBS) $(ICONV_LIBS) $(DL_LIBS) $(DISCID_LIBS) $(CUE_LIBS) $(COMPAT_LIBS)
|
||||
|
||||
input.o main.o ui_curses.o pulse.lo: .version
|
||||
input.o main.o ui_curses.o pulse.lo: CFLAGS += -DVERSION=\"$(VERSION)\"
|
||||
diff --git a/configure "b/configure"
|
||||
index 224feaa..31b7e25 100755
|
||||
--- a/configure
|
||||
+++ "b/configure"
|
||||
@@ -10,7 +10,6 @@ check_cflags()
|
||||
|
||||
for i in -Wold-style-definition \
|
||||
-Wno-pointer-sign \
|
||||
- -Werror-implicit-function-declaration \
|
||||
-Wno-unused-parameter
|
||||
do
|
||||
check_cc_flag $i
|
||||
@@ -156,7 +155,7 @@ check_mpc()
|
||||
else
|
||||
check_header mpcdec/mpcdec.h || return $?
|
||||
fi
|
||||
- check_library MPC "" "-lmpcdec -lm"
|
||||
+ check_library MPC "" "-lmpcdec "
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -168,13 +167,13 @@ check_cddb()
|
||||
|
||||
check_cdio()
|
||||
{
|
||||
- pkg_config CDIO "libcdio_cdda" "" "-lcdio_cdio -lcdio -lm"
|
||||
+ pkg_config CDIO "libcdio_cdda" "" "-lcdio_cdio -lcdio "
|
||||
return $?
|
||||
}
|
||||
|
||||
check_flac()
|
||||
{
|
||||
- pkg_config FLAC "flac" "" "-lFLAC -lm" || return $?
|
||||
+ pkg_config FLAC "flac" "" "-lFLAC " || return $?
|
||||
|
||||
# Make sure the FLAC_CFLAGS value is sane, strip trailing '/FLAC'.
|
||||
FLAC_CFLAGS=`echo $FLAC_CFLAGS | sed "s/FLAC$//"`
|
||||
@@ -183,7 +182,7 @@ check_flac()
|
||||
|
||||
check_mad()
|
||||
{
|
||||
- pkg_config MAD "mad" "" "-lmad -lm"
|
||||
+ pkg_config MAD "mad" "" "-lmad "
|
||||
return $?
|
||||
}
|
||||
|
||||
@@ -213,7 +212,7 @@ check_mikmod()
|
||||
|
||||
check_modplug()
|
||||
{
|
||||
- pkg_config MODPLUG "libmodplug" "-I/usr/include/libmodplug" "-lmodplug -lstdc++ -lm" || return $?
|
||||
+ pkg_config MODPLUG "libmodplug" "-I/usr/include/libmodplug" "-lmodplug -lstdc++ " || return $?
|
||||
MODPLUG_API_8=0
|
||||
if check_function "ModPlug_GetModuleType" $MODPLUG_CFLAGS $MODPLUG_LIBS
|
||||
then
|
||||
@@ -233,10 +232,10 @@ check_vorbis()
|
||||
{
|
||||
if test "$CONFIG_TREMOR" = y
|
||||
then
|
||||
- pkg_config VORBIS "vorbisidec" "" "-lvorbisidec -lm"
|
||||
+ pkg_config VORBIS "vorbisidec" "" "-lvorbisidec "
|
||||
return $?
|
||||
else
|
||||
- pkg_config VORBIS "vorbisfile" "" "-lvorbisfile -lvorbis -lm -logg"
|
||||
+ pkg_config VORBIS "vorbisfile" "" "-lvorbisfile -lvorbis -logg"
|
||||
return $?
|
||||
fi
|
||||
}
|
||||
@@ -364,14 +363,14 @@ check_mp4()
|
||||
check_header mp4.h || return $?
|
||||
fi
|
||||
check_header neaacdec.h &&
|
||||
- check_library MP4 "" "-lmp4v2 -lfaad -lm"
|
||||
+ check_library MP4 "" "-lmp4v2 -lfaad "
|
||||
return $?
|
||||
}
|
||||
|
||||
check_aac()
|
||||
{
|
||||
check_header neaacdec.h &&
|
||||
- check_library AAC "" "-lfaad -lm"
|
||||
+ check_library AAC "" "-lfaad "
|
||||
return $?
|
||||
}
|
||||
|
||||
diff --git a/scripts/checks.sh "b/scripts/checks.sh"
|
||||
index 64cbbf3..22ebf58 100644
|
||||
--- a/scripts/checks.sh
|
||||
+++ "b/scripts/checks.sh"
|
||||
@@ -643,9 +643,12 @@ check_pthread()
|
||||
OpenBSD)
|
||||
PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
|
||||
;;
|
||||
+ Haiku)
|
||||
+ PTHREAD_LIBS="$PTHREAD_LIBS"
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
- for __libs in "$PTHREAD_LIBS" -lpthread -lc_r -lkse
|
||||
+ for __libs in "$PTHREAD_LIBS" -lpthread -lc_r -lkse -lroot
|
||||
do
|
||||
test -z "$__libs" && continue
|
||||
check_library PTHREAD "-D_REENTRANT" "$__libs" && return 0
|
||||
Reference in New Issue
Block a user