summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2016-09-16 14:46:25 +0000
committerjperkin <jperkin@pkgsrc.org>2016-09-16 14:46:25 +0000
commitf3a57b5a777066cecb0a2a7e57ddaf39ee9cadd3 (patch)
treef457662631f8f9561d523a8409108f3812b48c6b /devel
parentf6d939feefdea1f139c313754cf776e9ee58e925 (diff)
downloadpkgsrc-f3a57b5a777066cecb0a2a7e57ddaf39ee9cadd3.tar.gz
Add support for SunOS.
Diffstat (limited to 'devel')
-rw-r--r--devel/radare2/Makefile4
-rw-r--r--devel/radare2/PLIST.SunOS8
-rw-r--r--devel/radare2/distinfo8
-rw-r--r--devel/radare2/patches/patch-configure25
-rw-r--r--devel/radare2/patches/patch-libr_Makefile25
-rw-r--r--devel/radare2/patches/patch-libr_config.mk.tail20
-rw-r--r--devel/radare2/patches/patch-libr_debug_p_debug__native.c15
-rw-r--r--devel/radare2/patches/patch-libr_include_r__types.h15
-rw-r--r--devel/radare2/patches/patch-libr_socket_run.c15
9 files changed, 132 insertions, 3 deletions
diff --git a/devel/radare2/Makefile b/devel/radare2/Makefile
index 34ca6e6d239..1c026bcd1ff 100644
--- a/devel/radare2/Makefile
+++ b/devel/radare2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2016/06/13 12:26:11 wiz Exp $
+# $NetBSD: Makefile,v 1.8 2016/09/16 14:46:25 jperkin Exp $
.include "Makefile.common"
@@ -16,7 +16,7 @@ CONFIGURE_ARGS+= --with-sysmagic
CONFIGURE_ARGS+= --with-syscapstone
CONFIGURE_ARGS+= --with-syszip
PKGCONFIG_OVERRIDE+= pkgcfg/*.pc*
-USE_TOOLS+= gmake pkg-config
+USE_TOOLS+= gmake patch pkg-config
# node
CHECK_INTERPRETER_SKIP+= share/radare2/${RADARE2_VERSION}/www/m/fonts/iconjar-map.js
diff --git a/devel/radare2/PLIST.SunOS b/devel/radare2/PLIST.SunOS
new file mode 100644
index 00000000000..71ba48edc9e
--- /dev/null
+++ b/devel/radare2/PLIST.SunOS
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST.SunOS,v 1.1 2016/09/16 14:46:25 jperkin Exp $
+lib/radare2/${PKGVERSION}/asm_RISCV.so
+lib/radare2/${PKGVERSION}/asm_cris.so
+lib/radare2/${PKGVERSION}/asm_mips.so
+lib/radare2/${PKGVERSION}/asm_ppc.so
+lib/radare2/${PKGVERSION}/asm_x86.so
+lib/radare2/${PKGVERSION}/asm_z80-cr.so
+lib/radare2/${PKGVERSION}/lib.so
diff --git a/devel/radare2/distinfo b/devel/radare2/distinfo
index 65a74118703..ae58057743c 100644
--- a/devel/radare2/distinfo
+++ b/devel/radare2/distinfo
@@ -1,6 +1,12 @@
-$NetBSD: distinfo,v 1.5 2016/06/13 12:26:11 wiz Exp $
+$NetBSD: distinfo,v 1.6 2016/09/16 14:46:25 jperkin Exp $
SHA1 (radare2-0.10.3.tar.xz) = c8e0ac38725e4ace2c594f2ff5208fd8ad3a85ee
RMD160 (radare2-0.10.3.tar.xz) = 047bb1d183c8c10498d0fc3b586f46334d583903
SHA512 (radare2-0.10.3.tar.xz) = c6cd195b755de8343b584a8d6f28ce1f7afb55f3c4de87d5a9ea5b4c6266b27a96f2546f070d567e142128386b81335462cac829fc765429ce5b1216d8eac736
Size (radare2-0.10.3.tar.xz) = 4954408 bytes
+SHA1 (patch-configure) = 5877c20ef721cbf4e86b03fc001eedf1e6851fc8
+SHA1 (patch-libr_Makefile) = b91596043e39f181f5cddfacda6f4647400eae0e
+SHA1 (patch-libr_config.mk.tail) = 0b547d49839acaed3547c57b2e0db2342d24f9b0
+SHA1 (patch-libr_debug_p_debug__native.c) = ada49491a8aa0cdb9a14c61795db011d75858cf7
+SHA1 (patch-libr_include_r__types.h) = 49feee975d6cb728b745385777ff0d39c31654e3
+SHA1 (patch-libr_socket_run.c) = b756feff8732e8454f3e6083db23f34e46666d93
diff --git a/devel/radare2/patches/patch-configure b/devel/radare2/patches/patch-configure
new file mode 100644
index 00000000000..73773763c5c
--- /dev/null
+++ b/devel/radare2/patches/patch-configure
@@ -0,0 +1,25 @@
+$NetBSD: patch-configure,v 1.3 2016/09/16 14:46:25 jperkin Exp $
+
+Support SunOS.
+
+--- configure.orig 2016-05-24 23:34:34.000000000 +0000
++++ configure
+@@ -488,6 +488,9 @@ USEROSTYPE="gnulinux"
+ HAVE_LIB_DL="1"
+ DL_LIBS="-ldl"
+ else
++if [ "$HOST_OS" = "sunos" ]; then
++USEROSTYPE="solaris"
++else
+ if [ "$HOST_OS" = "gnu/kfreebsd" ]; then
+ USEROSTYPE="bsd"
+ else
+@@ -501,7 +504,7 @@ if [ "$HOST_OS" = "openbsd" ]; then
+ USEROSTYPE="bsd"
+ else
+ if [ "$HOST_OS" = "darwin" ]; then
+-USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi
++USEROSTYPE="darwin"; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi
+ if [ "$LIBVERSION" = "xxx" ]; then
+ LIBVERSION="$VERSION"; fi
+ SEDFLAGS=" -e '"
diff --git a/devel/radare2/patches/patch-libr_Makefile b/devel/radare2/patches/patch-libr_Makefile
new file mode 100644
index 00000000000..5d8c4ce1b88
--- /dev/null
+++ b/devel/radare2/patches/patch-libr_Makefile
@@ -0,0 +1,25 @@
+$NetBSD: patch-libr_Makefile,v 1.1 2016/09/16 14:46:25 jperkin Exp $
+
+Use egrep instead of non-portable "grep -e".
+
+--- libr/Makefile.orig 2016-05-24 23:34:34.000000000 +0000
++++ libr/Makefile
+@@ -138,15 +138,15 @@ install: install-includes install-pkgcon
+ # TODO :Use INSTALL_DATA_DIR instead of mkdir
+ # libraries
+ @${INSTALL_DIR} "${DESTDIR}${LIBDIR}"
+- @$(foreach lib,$(shell find * -type f | grep -e '\.${EXT_SO}$$' | grep -Ev '(lib|parse)/t/' | grep lib | grep -v /bin/ | grep -v /p/), \
++ @$(foreach lib,$(shell find * -type f | egrep '\.${EXT_SO}$$' | egrep -v '(lib|parse)/t/' | grep lib | grep -v /bin/ | grep -v /p/), \
+ echo " ${DESTDIR}${LIBDIR}/$(call libpath-to-name-version,$(lib),${LIBVERSION})"; \
+ rm -f "${DESTDIR}${LIBDIR}/$(call libpath-to-name-version,$(lib),${LIBVERSION})"; \
+ ${INSTALL_LIB} "$(lib)" "${DESTDIR}${LIBDIR}/$(call libpath-to-name-version,$(lib),${LIBVERSION})"; \
+ ( cd "${DESTDIR}${LIBDIR}" ; ln -fs "$(call libpath-to-name-version,$(lib),${LIBVERSION})" "$(call libpath-to-name,$(lib))" ) ; \
+ )
+ # object archives
+- @for FILE in `find * -type f | grep -e '\.a$$' | grep -v fs/p` ; do \
+- echo " ${DESTDIR}${LIBDIR}/$$FILE"; ${INSTALL_DATA} $$FILE "${DESTDIR}${LIBDIR}" ; done
++ @for FILE in `find * -type f | egrep '\.a$$' | grep -v fs/p` ; do \
++ echo " ${DESTDIR}${LIBDIR}/$$FILE"; ${INSTALL_DATA} $$FILE "${DESTDIR}${LIBDIR}" ; done || true
+ # plugins
+ @${INSTALL_DIR} "${DESTDIR}${LIBDIR}/radare2/${VERSION}"
+ @for FILE in `find */p -perm -u+x -type f | grep -v exe | grep -v dll | grep ${EXT_SO}`; \
diff --git a/devel/radare2/patches/patch-libr_config.mk.tail b/devel/radare2/patches/patch-libr_config.mk.tail
new file mode 100644
index 00000000000..a6c22b8c2e5
--- /dev/null
+++ b/devel/radare2/patches/patch-libr_config.mk.tail
@@ -0,0 +1,20 @@
+$NetBSD: patch-libr_config.mk.tail,v 1.3 2016/09/16 14:46:25 jperkin Exp $
+
+Support SunOS.
+
+--- libr/config.mk.tail.orig 2016-05-24 23:34:34.000000000 +0000
++++ libr/config.mk.tail
+@@ -181,6 +181,13 @@ EXT_SO=so
+ EXT_EXE=
+ TH_LIBS=
+ endif
++ifeq (${OSTYPE},solaris)
++CFLAGS+=-D__UNIX__=1
++EXT_AR=a
++EXT_SO=so
++EXT_EXE=
++TH_LIBS=
++endif
+
+ ifeq (${EXT_SO},)
+ main:
diff --git a/devel/radare2/patches/patch-libr_debug_p_debug__native.c b/devel/radare2/patches/patch-libr_debug_p_debug__native.c
new file mode 100644
index 00000000000..1d645f26f27
--- /dev/null
+++ b/devel/radare2/patches/patch-libr_debug_p_debug__native.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-libr_debug_p_debug__native.c,v 1.1 2016/09/16 14:46:25 jperkin Exp $
+
+Support SunOS.
+
+--- libr/debug/p/debug_native.c.orig 2016-05-24 23:34:34.000000000 +0000
++++ libr/debug/p/debug_native.c
+@@ -22,7 +22,7 @@ static int r_debug_native_reg_write (RDe
+
+ #if __UNIX__ || __CYGWIN__
+ # include <errno.h>
+-# if !defined (__HAIKU__) && !defined (__CYGWIN__)
++# if !defined (__HAIKU__) && !defined (__CYGWIN__) && !defined (__sun)
+ # include <sys/ptrace.h>
+ # endif
+ # include <sys/wait.h>
diff --git a/devel/radare2/patches/patch-libr_include_r__types.h b/devel/radare2/patches/patch-libr_include_r__types.h
new file mode 100644
index 00000000000..74127420cca
--- /dev/null
+++ b/devel/radare2/patches/patch-libr_include_r__types.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-libr_include_r__types.h,v 1.1 2016/09/16 14:46:25 jperkin Exp $
+
+Support SunOS.
+
+--- libr/include/r_types.h.orig 2016-05-24 23:34:34.000000000 +0000
++++ libr/include/r_types.h
+@@ -50,7 +50,7 @@
+ #define MINGW32 1
+ #endif
+
+-#if defined(EMSCRIPTEN) || defined(__linux__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__) || defined(__QNX__)
++#if defined(EMSCRIPTEN) || defined(__linux__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__) || defined(__QNX__) || defined(__sun)
+ #define __BSD__ 0
+ #define __UNIX__ 1
+ #endif
diff --git a/devel/radare2/patches/patch-libr_socket_run.c b/devel/radare2/patches/patch-libr_socket_run.c
new file mode 100644
index 00000000000..7be24f38bbe
--- /dev/null
+++ b/devel/radare2/patches/patch-libr_socket_run.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-libr_socket_run.c,v 1.1 2016/09/16 14:46:25 jperkin Exp $
+
+Support SunOS.
+
+--- libr/socket/run.c.orig 2016-05-24 23:34:34.000000000 +0000
++++ libr/socket/run.c
+@@ -211,7 +211,7 @@ static void setASLR(int enabled) {
+ }
+
+ static int handle_redirection_proc (const char *cmd, bool in, bool out, bool err) {
+-#if __UNIX__ && !__ANDROID__ && LIBC_HAVE_FORK
++#if __UNIX__ && !__ANDROID__ && LIBC_HAVE_FORK && !defined(__sun)
+ // use PTY to redirect I/O because pipes can be problematic in
+ // case of interactive programs.
+ int fdm;