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 for Smar...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5f8c8c1ac25b
branches: trunk
changeset: 398761:5f8c8c1ac25b
user: fox <fox%pkgsrc.org@localhost>
date: Tue Jul 30 00:06:50 2019 +0000
description:
fasttracker2: Fixes builds for SmartOS.
1. Adds the __sun / sun macro check.
2. libiconv is now explicitly linked to allow multi-platform builds.
3. Uses stat(2) in SmartOS for checking directory types.
Thanks to wilbury for testing.
diffstat:
audio/fasttracker2/Makefile | 4 +-
audio/fasttracker2/distinfo | 6 +-
audio/fasttracker2/patches/patch-src_ft2__diskop.c | 61 +++++++++++++++++++-
audio/fasttracker2/patches/patch-src_ft2__unicode.c | 10 ++-
4 files changed, 69 insertions(+), 12 deletions(-)
diffs (159 lines):
diff -r a54b5409f08b -r 5f8c8c1ac25b audio/fasttracker2/Makefile
--- a/audio/fasttracker2/Makefile Mon Jul 29 20:40:19 2019 +0000
+++ b/audio/fasttracker2/Makefile Tue Jul 30 00:06:50 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.31 2019/07/27 21:26:06 fox Exp $
+# $NetBSD: Makefile,v 1.32 2019/07/30 00:06:50 fox Exp $
DISTNAME= ft2clone-${DISTVERSION}-code
PKGNAME= fasttracker2-${DISTVERSION:C/b/2./}
@@ -18,6 +18,7 @@
USE_LANGUAGES= c c++
LDFLAGS+= -lSDL2 -lpthread -lstdc++ -lm
+LDFLAGS.SunOS+= -liconv
INSTALLATION_DIRS+= bin share/pixmaps
@@ -38,5 +39,6 @@
${INSTALL_DATA} ${WRKSRC}/src/gfxdata/icon/ft2-clone.ico \
${DESTDIR}${PREFIX}/share/pixmaps
+.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/SDL2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r a54b5409f08b -r 5f8c8c1ac25b audio/fasttracker2/distinfo
--- a/audio/fasttracker2/distinfo Mon Jul 29 20:40:19 2019 +0000
+++ b/audio/fasttracker2/distinfo Tue Jul 30 00:06:50 2019 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.30 2019/07/23 08:20:22 fox Exp $
+$NetBSD: distinfo,v 1.31 2019/07/30 00:06:50 fox Exp $
SHA1 (ft2clone-b162-code.zip) = 4616581dac4cd8b498c88cad381dd9910b326390
RMD160 (ft2clone-b162-code.zip) = a24993258f783e345f812f75a35a703154fb0aec
SHA512 (ft2clone-b162-code.zip) = 4b85514aece028075e8e5017c3b0c26638f0c74e18ac669788393a03457cb903959a548de9b1ca249eab8e629e18503dd1a7519aa81645a26e8f25684c4ec817
Size (ft2clone-b162-code.zip) = 3953315 bytes
-SHA1 (patch-src_ft2__diskop.c) = 0ade49429ec36d44b6cb6bc3b829317fcd08df81
+SHA1 (patch-src_ft2__diskop.c) = 054e62ba9b512ea0297874988252e7fd0db4e162
SHA1 (patch-src_ft2__header.h) = 738181fabffcdcaa5ed7a4b1ae533246b6788bff
SHA1 (patch-src_ft2__sample__ed.c) = 5cb4bbdb17d6e7cd98d378fe7dac8524630783c0
-SHA1 (patch-src_ft2__unicode.c) = 3dca4d5b2de1a2794bde7060d2f7bf6f4923c91c
+SHA1 (patch-src_ft2__unicode.c) = bca10844af2298f77c4f2a8580d030bf2ad54364
diff -r a54b5409f08b -r 5f8c8c1ac25b audio/fasttracker2/patches/patch-src_ft2__diskop.c
--- a/audio/fasttracker2/patches/patch-src_ft2__diskop.c Mon Jul 29 20:40:19 2019 +0000
+++ b/audio/fasttracker2/patches/patch-src_ft2__diskop.c Tue Jul 30 00:06:50 2019 +0000
@@ -1,9 +1,11 @@
-$NetBSD: patch-src_ft2__diskop.c,v 1.4 2019/06/20 11:39:06 fox Exp $
+$NetBSD: patch-src_ft2__diskop.c,v 1.5 2019/07/30 00:06:50 fox Exp $
-Added <sys/types.h> / <sys/stat.h> to prevent "unknown type name"
-(dev_t, ino_t and nlink_t) error from the included <fts.h>.
+1. Added <sys/types.h> / <sys/stat.h> to prevent "unknown type name"
+ (dev_t, ino_t and nlink_t) error from the included <fts.h>.
---- src/ft2_diskop.c.orig 2019-04-19 01:53:39.359713817 +0000
+2. Added SunOS / SmartOS compatibility.
+
+--- src/ft2_diskop.c.orig 2019-06-20 21:20:34.000000000 +0000
+++ src/ft2_diskop.c
@@ -15,6 +15,8 @@
#include <direct.h>
@@ -14,3 +16,54 @@
#include <fts.h> // for fts_open() and stuff in recursiveDelete()
#include <unistd.h>
#include <dirent.h>
+@@ -1395,6 +1397,10 @@ static int8_t findFirst(DirRec *searchRe
+ int64_t fSize;
+ #endif
+
++#if defined(__sun) || defined(sun)
++ struct stat s;
++#endif
++
+ searchRec->nameU = NULL; // this one must be initialized
+
+ #ifdef _WIN32
+@@ -1422,9 +1428,19 @@ static int8_t findFirst(DirRec *searchRe
+ return LFF_SKIP;
+
+ searchRec->filesize = 0;
++
++#if defined(__sun) || defined(sun)
++ stat(fData->d_name, &s);
++ searchRec->isDir = (s.st_mode != S_IFDIR) ? true : false;
++#else
+ searchRec->isDir = (fData->d_type == DT_DIR) ? true : false;
++#endif
+
++#if defined(__sun) || defined(sun)
++ if (s.st_mode == S_IFLNK)
++#else
+ if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK)
++#endif
+ {
+ if (stat(fData->d_name, &st) == 0)
+ {
+@@ -1488,9 +1504,19 @@ static int8_t findNext(DirRec *searchRec
+ return LFF_SKIP;
+
+ searchRec->filesize = 0;
++
++#if defined(__sun) || defined(sun)
++ stat(fData->d_name, &s);
++ searchRec->isDir = (s.st_mode != S_IFDIR) ? true : false;
++#else
+ searchRec->isDir = (fData->d_type == DT_DIR) ? true : false;
++#endif
+
++#if defined(__sun) || defined(sun)
++ if (s.st_mode == S_IFLNK)
++#else
+ if (fData->d_type == DT_UNKNOWN || fData->d_type == DT_LNK)
++#endif
+ {
+ if (stat(fData->d_name, &st) == 0)
+ {
diff -r a54b5409f08b -r 5f8c8c1ac25b audio/fasttracker2/patches/patch-src_ft2__unicode.c
--- a/audio/fasttracker2/patches/patch-src_ft2__unicode.c Mon Jul 29 20:40:19 2019 +0000
+++ b/audio/fasttracker2/patches/patch-src_ft2__unicode.c Tue Jul 30 00:06:50 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_ft2__unicode.c,v 1.3 2019/06/20 11:39:06 fox Exp $
+$NetBSD: patch-src_ft2__unicode.c,v 1.4 2019/07/30 00:06:50 fox Exp $
1. Added a type cast to iconv(3) calls to match the prototypes defined
in NetBSD's iconv.h.
@@ -6,13 +6,15 @@
2. Added a NetBSD specific iconv_open() call to prevent failures due
to mismatches iconv_open() parameters present in GNU iconv(3).
+3. Added support for SunOS / SmartOS compatibility.
+
--- src/ft2_unicode.c.orig 2019-06-18 19:45:46.000000000 +0000
+++ src/ft2_unicode.c
@@ -271,7 +271,11 @@ char *cp437ToUtf8(char *src)
inLen = srcLen;
outPtr = outBuf;
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) || defined(__sun) || defined(sun)
+ rc = iconv(cd, (const char **)&inPtr, &inLen, &outPtr, &outLen);
+#else
rc = iconv(cd, &inPtr, &inLen, &outPtr, &outLen);
@@ -24,7 +26,7 @@
#ifdef __APPLE__
cd = iconv_open("437//TRANSLIT//IGNORE", "UTF-8-MAC");
-+#elif defined(__NetBSD__)
++#elif defined(__NetBSD__) || defined(__sun) || defined(sun)
+ cd = iconv_open("437", "UTF-8");
#else
cd = iconv_open("437//TRANSLIT//IGNORE", "UTF-8");
@@ -33,7 +35,7 @@
inLen = srcLen;
outPtr = outBuf;
-+#if defined(__NetBSD__)
++#if defined(__NetBSD__) || defined(__sun) || defined(sun)
+ rc = iconv(cd, (const char **)&inPtr, &inLen, &outPtr, &outLen);
+#else
rc = iconv(cd, &inPtr, &inLen, &outPtr, &outLen);
Home |
Main Index |
Thread Index |
Old Index