pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/fasttracker2



Module Name:    pkgsrc
Committed By:   fox
Date:           Tue Jul 30 00:06:50 UTC 2019

Modified Files:
        pkgsrc/audio/fasttracker2: Makefile distinfo
        pkgsrc/audio/fasttracker2/patches: patch-src_ft2__diskop.c
            patch-src_ft2__unicode.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 pkgsrc/audio/fasttracker2/Makefile
cvs rdiff -u -r1.30 -r1.31 pkgsrc/audio/fasttracker2/distinfo
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/audio/fasttracker2/patches/patch-src_ft2__diskop.c
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/audio/fasttracker2/patches/patch-src_ft2__unicode.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/fasttracker2/Makefile
diff -u pkgsrc/audio/fasttracker2/Makefile:1.31 pkgsrc/audio/fasttracker2/Makefile:1.32
--- pkgsrc/audio/fasttracker2/Makefile:1.31     Sat Jul 27 21:26:06 2019
+++ pkgsrc/audio/fasttracker2/Makefile  Tue Jul 30 00:06:50 2019
@@ -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 @@ WRKSRC=               ${WRKDIR}/ft2-clone-code
 USE_LANGUAGES= c c++
 
 LDFLAGS+=      -lSDL2 -lpthread -lstdc++ -lm
+LDFLAGS.SunOS+=        -liconv
 
 INSTALLATION_DIRS+=    bin share/pixmaps
 
@@ -38,5 +39,6 @@ do-install:
        ${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"

Index: pkgsrc/audio/fasttracker2/distinfo
diff -u pkgsrc/audio/fasttracker2/distinfo:1.30 pkgsrc/audio/fasttracker2/distinfo:1.31
--- pkgsrc/audio/fasttracker2/distinfo:1.30     Tue Jul 23 08:20:22 2019
+++ pkgsrc/audio/fasttracker2/distinfo  Tue Jul 30 00:06:50 2019
@@ -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

Index: pkgsrc/audio/fasttracker2/patches/patch-src_ft2__diskop.c
diff -u pkgsrc/audio/fasttracker2/patches/patch-src_ft2__diskop.c:1.4 pkgsrc/audio/fasttracker2/patches/patch-src_ft2__diskop.c:1.5
--- pkgsrc/audio/fasttracker2/patches/patch-src_ft2__diskop.c:1.4       Thu Jun 20 11:39:06 2019
+++ pkgsrc/audio/fasttracker2/patches/patch-src_ft2__diskop.c   Tue Jul 30 00:06:50 2019
@@ -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 @@ Added <sys/types.h> / <sys/stat.h> to pr
  #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)
+               {

Index: pkgsrc/audio/fasttracker2/patches/patch-src_ft2__unicode.c
diff -u pkgsrc/audio/fasttracker2/patches/patch-src_ft2__unicode.c:1.3 pkgsrc/audio/fasttracker2/patches/patch-src_ft2__unicode.c:1.4
--- pkgsrc/audio/fasttracker2/patches/patch-src_ft2__unicode.c:1.3      Thu Jun 20 11:39:06 2019
+++ pkgsrc/audio/fasttracker2/patches/patch-src_ft2__unicode.c  Tue Jul 30 00:06:50 2019
@@ -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 @@ in NetBSD's iconv.h.
 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 @@ to mismatches iconv_open() parameters pr
  
  #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 @@ to mismatches iconv_open() parameters pr
        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