summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorwiedi <wiedi@pkgsrc.org>2017-07-03 11:52:37 +0000
committerwiedi <wiedi@pkgsrc.org>2017-07-03 11:52:37 +0000
commitfc9206bfe7667d5028e53750bdd53f9579db5ee6 (patch)
tree68982e54d845ad08b59214f574de158d1dd3399f /multimedia
parent9bc689c623e233e044336960aef4df7083c8f417 (diff)
downloadpkgsrc-fc9206bfe7667d5028e53750bdd53f9579db5ee6.tar.gz
fix build on SunOS
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/tstools/Makefile5
-rw-r--r--multimedia/tstools/distinfo6
-rw-r--r--multimedia/tstools/patches/patch-Makefile15
-rw-r--r--multimedia/tstools/patches/patch-compat.h16
-rw-r--r--multimedia/tstools/patches/patch-misc.c14
-rw-r--r--multimedia/tstools/patches/patch-tsserve.c14
6 files changed, 68 insertions, 2 deletions
diff --git a/multimedia/tstools/Makefile b/multimedia/tstools/Makefile
index de96749a5d5..27aa8eae11c 100644
--- a/multimedia/tstools/Makefile
+++ b/multimedia/tstools/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.6 2014/12/21 12:12:42 mef Exp $
+# $NetBSD: Makefile,v 1.7 2017/07/03 11:52:37 wiedi Exp $
#
DISTNAME= tstools-1_11
+PKGREVISION= 1
PKGNAME= ${DISTNAME:S/_/./}
CATEGORIES= multimedia
MASTER_SITES= https://tstools.googlecode.com/files/
@@ -17,6 +18,8 @@ MAKE_JOBS_SAFE= no
WRKSRC= ${WRKDIR}/${DISTNAME:S/_/./}
USE_TOOLS+= gmake
+LDFLAGS.SunOS+= -lsocket -lnsl -lresolv
+
TSPROGS=es2ts \
esdots \
esfilter \
diff --git a/multimedia/tstools/distinfo b/multimedia/tstools/distinfo
index 74f086b965c..fb7dd90b627 100644
--- a/multimedia/tstools/distinfo
+++ b/multimedia/tstools/distinfo
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 23:54:33 agc Exp $
+$NetBSD: distinfo,v 1.3 2017/07/03 11:52:37 wiedi Exp $
SHA1 (tstools-1_11.tgz) = fb8e5f59fada384d2d7865f840a0ad28404bde81
RMD160 (tstools-1_11.tgz) = f4fa0e3f49c9409096608a6bf3849c785de9d3f5
SHA512 (tstools-1_11.tgz) = 8cc0f5d4ff22bd3151a4fa3012d22ebc36dd3c7546258f9f9ecc2d0513e478aeccd8f5fff7cfd24e647e0e668b0968e780dab4418469c0979ccc6176136d9e26
Size (tstools-1_11.tgz) = 392616 bytes
+SHA1 (patch-Makefile) = 895018d485d31fdecdc3a4ee9f672b0a3c34e6df
+SHA1 (patch-compat.h) = b08f53225da9830de408dbadbaa51411b2838380
+SHA1 (patch-misc.c) = 17033aa72ee1fc8b2ac8b8870ed0a1f98b9ec01e
+SHA1 (patch-tsserve.c) = 519f2ed14d50c258ca5b7cc747793d280f7fc6e3
diff --git a/multimedia/tstools/patches/patch-Makefile b/multimedia/tstools/patches/patch-Makefile
new file mode 100644
index 00000000000..a003aa16ff3
--- /dev/null
+++ b/multimedia/tstools/patches/patch-Makefile
@@ -0,0 +1,15 @@
+$NetBSD: patch-Makefile,v 1.1 2017/07/03 11:52:37 wiedi Exp $
+
+Don't overwrite pkgsrc LDFLAGS
+
+--- Makefile.orig 2008-11-06 23:15:49.000000000 +0000
++++ Makefile
+@@ -80,7 +80,7 @@ else
+ endif
+
+ CFLAGS = $(WARNING_FLAGS) $(OPTIMISE_FLAGS) $(LFS_FLAGS) -I. $(PROFILE_FLAGS) $(ARCH_FLAGS)
+-LDFLAGS = -g -lm $(PROFILE_FLAGS) $(ARCH_FLAGS)
++LDFLAGS += -g -lm $(PROFILE_FLAGS) $(ARCH_FLAGS)
+
+ # Target directories
+ OBJDIR = obj
diff --git a/multimedia/tstools/patches/patch-compat.h b/multimedia/tstools/patches/patch-compat.h
new file mode 100644
index 00000000000..83d93585142
--- /dev/null
+++ b/multimedia/tstools/patches/patch-compat.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-compat.h,v 1.1 2017/07/03 11:52:37 wiedi Exp $
+
+prevent conflicting offset_t on SunOS
+
+--- compat.h.orig 2008-11-06 23:15:49.000000000 +0000
++++ compat.h
+@@ -113,7 +113,9 @@ typedef uint8_t byte;
+ // do both, here, for safety.
+ #include <sys/types.h>
+ #include <unistd.h>
++#if !defined(__sun)
+ typedef off_t offset_t;
++#endif
+
+ #if defined(__linux__) && !defined(__USE_FILE_OFFSET64)
+ // If Linux does not have 64 bit support built in, then our offsets will
diff --git a/multimedia/tstools/patches/patch-misc.c b/multimedia/tstools/patches/patch-misc.c
new file mode 100644
index 00000000000..ae989e6896f
--- /dev/null
+++ b/multimedia/tstools/patches/patch-misc.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-misc.c,v 1.1 2017/07/03 11:52:37 wiedi Exp $
+
+no sin_len on SunOS
+--- misc.c.orig 2008-11-06 23:15:49.000000000 +0000
++++ misc.c
+@@ -1277,7 +1277,7 @@ extern int connect_socket(char *hostname
+ }
+ memcpy(&ipaddr.sin_addr.s_addr, hp->h_addr, hp->h_length);
+ ipaddr.sin_family = hp->h_addrtype;
+-#if !defined(__linux__)
++#if !defined(__linux__) && !defined(__sun)
+ // On BSD, the length is defined in the datastructure
+ ipaddr.sin_len = sizeof(struct sockaddr_in);
+ #endif // __linux__
diff --git a/multimedia/tstools/patches/patch-tsserve.c b/multimedia/tstools/patches/patch-tsserve.c
new file mode 100644
index 00000000000..b3f681fc2eb
--- /dev/null
+++ b/multimedia/tstools/patches/patch-tsserve.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-tsserve.c,v 1.1 2017/07/03 11:52:37 wiedi Exp $
+
+no sin_len on SunOS
+--- tsserve.c.orig 2008-11-06 23:15:49.000000000 +0000
++++ tsserve.c
+@@ -3041,7 +3041,7 @@ static int run_server(tsserve_context_p
+
+ // Bind it to port `listen_port` on this machine
+ memset(&ipaddr,0,sizeof(ipaddr));
+-#if !defined(__linux__) && !defined(_WIN32)
++#if !defined(__linux__) && !defined(_WIN32) && !defined(__sun)
+ // On BSD, the length is defined in the datastructure
+ ipaddr.sin_len = sizeof(struct sockaddr_in);
+ #endif