pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/radare2 Add support for SunOS.
details: https://anonhg.NetBSD.org/pkgsrc/rev/ec5be1d31548
branches: trunk
changeset: 352549:ec5be1d31548
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Fri Sep 16 14:46:25 2016 +0000
description:
Add support for SunOS.
diffstat:
devel/radare2/Makefile | 4 +-
devel/radare2/PLIST.SunOS | 8 +++++
devel/radare2/distinfo | 8 ++++-
devel/radare2/patches/patch-configure | 25 ++++++++++++++++
devel/radare2/patches/patch-libr_Makefile | 25 ++++++++++++++++
devel/radare2/patches/patch-libr_config.mk.tail | 20 ++++++++++++
devel/radare2/patches/patch-libr_debug_p_debug__native.c | 15 +++++++++
devel/radare2/patches/patch-libr_include_r__types.h | 15 +++++++++
devel/radare2/patches/patch-libr_socket_run.c | 15 +++++++++
9 files changed, 132 insertions(+), 3 deletions(-)
diffs (186 lines):
diff -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/Makefile
--- a/devel/radare2/Makefile Fri Sep 16 13:12:29 2016 +0000
+++ b/devel/radare2/Makefile Fri Sep 16 14:46:25 2016 +0000
@@ -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-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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/PLIST.SunOS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/PLIST.SunOS Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/distinfo
--- a/devel/radare2/distinfo Fri Sep 16 13:12:29 2016 +0000
+++ b/devel/radare2/distinfo Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/patches/patch-configure
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/patches/patch-configure Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/patches/patch-libr_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/patches/patch-libr_Makefile Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/patches/patch-libr_config.mk.tail
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/patches/patch-libr_config.mk.tail Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/patches/patch-libr_debug_p_debug__native.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/patches/patch-libr_debug_p_debug__native.c Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/patches/patch-libr_include_r__types.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/patches/patch-libr_include_r__types.h Fri Sep 16 14:46:25 2016 +0000
@@ -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 -r a8dbc2b02ea8 -r ec5be1d31548 devel/radare2/patches/patch-libr_socket_run.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/radare2/patches/patch-libr_socket_run.c Fri Sep 16 14:46:25 2016 +0000
@@ -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;
Home |
Main Index |
Thread Index |
Old Index