pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/fasttracker2 fasttracker2: Fixes builds in Linux.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0da1954514aa
branches:  trunk
changeset: 399366:0da1954514aa
user:      fox <fox%pkgsrc.org@localhost>
date:      Wed Aug 07 23:44:32 2019 +0000

description:
fasttracker2: Fixes builds in Linux.

1. Should fix builds in Ubuntu / CentOS.

2. Rewrites the build system to use cmake.

3. Adds ALSA support in Linux.

4. Bumps PKGREVISION.

Thanks to nia@ for helping re-write the build system.

diffstat:

 audio/fasttracker2/Makefile                     |  23 +++++++++++++----------
 audio/fasttracker2/distinfo                     |   3 ++-
 audio/fasttracker2/patches/patch-CMakeLists.txt |  18 ++++++++++++++++++
 3 files changed, 33 insertions(+), 11 deletions(-)

diffs (90 lines):

diff -r e9a44954531d -r 0da1954514aa audio/fasttracker2/Makefile
--- a/audio/fasttracker2/Makefile       Wed Aug 07 21:54:34 2019 +0000
+++ b/audio/fasttracker2/Makefile       Wed Aug 07 23:44:32 2019 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.34 2019/08/05 16:57:36 fox Exp $
+# $NetBSD: Makefile,v 1.35 2019/08/07 23:44:32 fox Exp $
 
 DISTNAME=      ft2clone-${DISTVERSION}-code
 PKGNAME=       fasttracker2-${DISTVERSION:C/b/2./}
 DISTVERSION=   b164
+PKGREVISION=   1
 CATEGORIES=    audio
 MASTER_SITES=  https://16-bits.org/ \
                ${MASTER_SITE_FREEBSD_LOCAL:=ehaupt/}
@@ -14,30 +15,32 @@
 LICENSE=       modified-bsd AND cc-by-nc-sa-v4.0-license
 
 WRKSRC=                ${WRKDIR}/ft2-clone-code
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c99 c++
 
-LDFLAGS+=      -lSDL2 -lpthread -lstdc++ -lm
-LDFLAGS.SunOS+=        -liconv
+USE_CMAKE=     yes
+
+LIBS.SunOS+=   -liconv
 
 INSTALLATION_DIRS+=    bin share/pixmaps
 
 SUBST_CLASSES+=                d2u
 SUBST_MESSAGE.d2u=     Converting CRLF to LF.
 SUBST_STAGE.d2u=       post-extract
-SUBST_FILES.d2u=       src/*.[ch]
+SUBST_FILES.d2u=       CMakeLists.txt src/*.[ch]
 SUBST_FILTER_CMD.d2u=  ${TR} -d '\r'
 
-do-build:
-       ${CC} ${CFLAGS} ${LDFLAGS} \
-               ${WRKSRC}/src/rtmidi/*.cpp ${WRKSRC}/src/gfxdata/*.c ${WRKSRC}/src/*.c \
-               -o ${WRKSRC}/release/other/ft2-clone
-
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/release/other/ft2-clone \
                ${DESTDIR}${PREFIX}/bin
        ${INSTALL_DATA} ${WRKSRC}/src/gfxdata/icon/ft2-clone.ico \
                ${DESTDIR}${PREFIX}/share/pixmaps
 
+.include "../../mk/bsd.prefs.mk"
+.if ${OPSYS} != "Linux"
+BUILDLINK_TRANSFORM+=  rm:-lasound
+.else
+.  include "../../audio/alsa-lib/buildlink3.mk"
+.endif
 .include "../../converters/libiconv/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r e9a44954531d -r 0da1954514aa audio/fasttracker2/distinfo
--- a/audio/fasttracker2/distinfo       Wed Aug 07 21:54:34 2019 +0000
+++ b/audio/fasttracker2/distinfo       Wed Aug 07 23:44:32 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.34 2019/08/05 16:57:36 fox Exp $
+$NetBSD: distinfo,v 1.35 2019/08/07 23:44:32 fox Exp $
 
 SHA1 (ft2clone-b164-code.zip) = d1faf35d4c34943869387563b5aa10acb40ac729
 RMD160 (ft2clone-b164-code.zip) = f5a03267fae6c042f0b5769b3b6849d9d0835885
 SHA512 (ft2clone-b164-code.zip) = a0bc0af3fdeb2ed3591f34c8c1072bf06c88fd8022cb2586c56db24f2eba024c9525ea30c03263ab126f2c1eace0b621d96481992c46ac68d1e506c5c125a8bf
 Size (ft2clone-b164-code.zip) = 4523213 bytes
+SHA1 (patch-CMakeLists.txt) = b64b4e4b9cd40e97c34d1541937b6c0b7f451093
diff -r e9a44954531d -r 0da1954514aa audio/fasttracker2/patches/patch-CMakeLists.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/fasttracker2/patches/patch-CMakeLists.txt   Wed Aug 07 23:44:32 2019 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2019/08/07 23:44:32 fox Exp $
+
+Only define __LINUX_ALSA__ on Linux.
+
+--- CMakeLists.txt.orig        2019-08-07 22:40:56.490008720 +0000
++++ CMakeLists.txt
+@@ -20,7 +20,10 @@ target_include_directories(ft2-clone SYS
+ 
+ target_link_libraries(ft2-clone 
+     PRIVATE m asound pthread ${SDL2_LIBRARIES})
+-target_compile_definitions(ft2-clone PRIVATE __LINUX_ALSA__)
++
++if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
++    target_compile_definitions(ft2-clone PRIVATE __LINUX_ALSA__)
++endif()
+ 
+ 
+ install(TARGETS ft2-clone



Home | Main Index | Thread Index | Old Index