[97086] users/g5pw/dports/devel/radare2

g5pw at macports.org g5pw at macports.org
Mon Aug 27 03:31:50 PDT 2012


Revision: 97086
          https://trac.macports.org/changeset/97086
Author:   g5pw at macports.org
Date:     2012-08-27 03:31:48 -0700 (Mon, 27 Aug 2012)
Log Message:
-----------
devel/radare2:
- added universal variant
- renamed patchfiles
- moved a reinplace to an actual patchfile

Modified Paths:
--------------
    users/g5pw/dports/devel/radare2/Portfile

Added Paths:
-----------
    users/g5pw/dports/devel/radare2/files/libr-Makefile.diff
    users/g5pw/dports/devel/radare2/files/libr-config.mk.tail.diff
    users/g5pw/dports/devel/radare2/files/libr-rules.mk.diff
    users/g5pw/dports/devel/radare2/files/mk-gcc.mk.diff

Removed Paths:
-------------
    users/g5pw/dports/devel/radare2/change_install_names
    users/g5pw/dports/devel/radare2/files/patch-libr-Makefile.diff
    users/g5pw/dports/devel/radare2/files/patch-libr-config.mk.tail.diff
    users/g5pw/dports/devel/radare2/files/patch-libr-rules.mk.diff
    users/g5pw/dports/devel/radare2/files/patch-mk-gcc.mk.diff

Modified: users/g5pw/dports/devel/radare2/Portfile
===================================================================
--- users/g5pw/dports/devel/radare2/Portfile	2012-08-27 10:16:40 UTC (rev 97085)
+++ users/g5pw/dports/devel/radare2/Portfile	2012-08-27 10:31:48 UTC (rev 97086)
@@ -5,6 +5,7 @@
 
 name                radare2
 version             0.9
+revision            1
 categories          devel
 platforms           darwin
 license             LGPL-3+
@@ -18,14 +19,13 @@
                     sha256  e12feea3b776601d7b680e64250897110cf4fca2f1214b4c527e13b7abe900e0
 
 patch.pre_args      -p1
-patchfiles          patch-libr-Makefile.diff \
-                    patch-libr-config.mk.tail.diff \
-                    patch-libr-rules.mk.diff \
-                    patch-mk-gcc.mk.diff
+patchfiles          libr-Makefile.diff \
+                    libr-config.mk.tail.diff \
+                    libr-rules.mk.diff \
+                    mk-gcc.mk.diff \
+                    configure.diff
 
-pre-patch {
-    reinplace "s/\"main(){}\"/\"int main(){}\"/" ${worksrcpath}/configure
-}
+variant universal {}
 
 build.env-append    LDFLAGS="-L${prefix}/lib"
 build.args          CC="${configure.cc} [get_canonical_archflags]"

Deleted: users/g5pw/dports/devel/radare2/change_install_names
===================================================================
--- users/g5pw/dports/devel/radare2/change_install_names	2012-08-27 10:16:40 UTC (rev 97085)
+++ users/g5pw/dports/devel/radare2/change_install_names	2012-08-27 10:31:48 UTC (rev 97086)
@@ -1,74 +0,0 @@
-#!/bin/sh
-
-# Be noise.
-VERBOSE=no
-# Stop on path failures.
-STOP=no
-
-# This is the DESTROOT we have installed into.
-# Example:
-#   $ DESTROOT=/sandbox/radare2 make install
-#   $ sudo change_install_names /sandbox/radare2
-DESTROOT="${1}"
-
-# find files in DESTROOT
-FILES=( $(find "${DESTROOT}" -type f) )
-IFS=$'\n'
-# work on each file in FILES
-for (( fc = 0 ; fc < ${#FILES[@]} ; fc++ ))
-do
-    # If we are not a file or dir we are done.
-    if [[ ! -f "${FILES[$fc]}" && ! -d "${FILES[$fc]}" ]]
-    then
-        echo "FILE ${eError}: ${FILES[$fc]}"
-        break 1
-    # If we are a file lets try to fix our id. We do not bother checking file type because
-    # install_name_tool harmlessly fails to work on files it is not designed to work on.
-    elif [[ -f "${FILES[$fc]}" ]]
-    then
-        FILEID=$(echo "${FILES[$fc]}" | sed "s|^${DESTROOT}||")
-        [ "$VERBOSE" == "yes" ] && echo "FILEID: ${FILEID}"
-        # fix the file id.
-        install_name_tool -id "${FILEID}" "${FILES[$fc]}" 2>/dev/null
-    fi
-    # If not a dir, look for shared libs.
-    if [ ! -d "${FILES[$fc]}" ]
-    then
-        # Create an array of all the shared files if any.
-        SHAREDLIBRARYS=( $(otool -XL "${FILES[$fc]}" | sed -e "s/^Archive.*//" | tr -d '\t' | awk '{print $1}') )
-        if [[ ${#SHAREDLIBRARYS[@]} -gt 0 ]]
-        then
-            for (( sc = 0 ; sc < ${#SHAREDLIBRARYS[@]} ; sc++ ))
-            do
-                # If the shared lib path is not a full path we need to fix it.
-                if [ ${SHAREDLIBRARYS[$sc]:0:1} != "/" ]
-                then
-                    [ "$VERBOSE" == "yes" ] && echo "${FILES[$fc]}"
-                    [ "$VERBOSE" == "yes" ] && echo "${SHAREDLIBRARYS[$sc]}"
-                    [ "$VERBOSE" == "yes" ] && echo "find ${DESTROOT} -not -type d -name ${SHAREDLIBRARYS[$sc]}"
-                    # Try and find the lib in DESTROOT
-                    FOUNDPATH=$(find ${DESTROOT} -not -type d -name ${SHAREDLIBRARYS[$sc]} | sed "s,^${DESTROOT},,")
-                    echo "${FOUNDPATH}"
-                    # Fix the path.
-                    install_name_tool -change "${SHAREDLIBRARYS[$sc]}" "${FOUNDPATH}" "${FILES[$fc]}" 2>/dev/null
-                fi
-            done
-            # After fix test.
-            SHAREDLIBRARYS=( $(otool -XL "${FILES[$fc]}" | sed -e "s/^Archive.*//" | tr -d '\t' | awk '{print $1}') )
-            for (( sc = 0 ; sc < ${#SHAREDLIBRARYS[@]} ; sc++ ))
-            do
-                # Look for each shared files path.
-                # Also prepend DESTROOT to each path as we may be installing the path from DESTROOT now.
-                if [[ ! -f "${DESTROOT}${SHAREDLIBRARYS[$sc]}" && ! -f "${SHAREDLIBRARYS[$sc]}" ]]
-                then
-                    echo "${FILES[$fc]}"
-                    echo "${SHAREDLIBRARYS[$sc]}"
-                    exit 1
-                fi
-            done
-            [ "$VERBOSE" == "yes" ] && otool -XL "${FILES[$fc]}"
-            [ "$STOP" == "yes" ] && break 2
-        fi
-    fi
-done
-unset IFS

Copied: users/g5pw/dports/devel/radare2/files/libr-Makefile.diff (from rev 94752, users/g5pw/dports/devel/radare2/files/patch-libr-Makefile.diff)
===================================================================
--- users/g5pw/dports/devel/radare2/files/libr-Makefile.diff	                        (rev 0)
+++ users/g5pw/dports/devel/radare2/files/libr-Makefile.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -0,0 +1,29 @@
+--- a/libr/Makefile	2011-12-16 06:44:05.000000000 -0800
++++ b/libr/Makefile	2011-12-16 12:44:12.000000000 -0800
+@@ -54,7 +54,7 @@
+ 	done
+ 	for a in ${LIBLIST} ; do \
+ 		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_SO} ${LFX}/libr_$${a}.${EXT_SO} ; \
+-		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_SO} ${LFX}/libr_$${a}.${EXT_SO}.${LIBVERSION} ; \
++		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_SO} ${LFX}/libr_$${a}.${LIBVERSION}.${EXT_SO} ; \
+ 		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_AR} ${LFX}/libr_$${a}.${EXT_AR} ; \
+ 		for b in $${a}/p/*.${EXT_SO} ; do \
+ 			if [ -e ${PWD}/$${b} ] ; then \
+@@ -68,12 +68,12 @@
+ 	# libraries
+ 	@${INSTALL_DIR} ${LFX}
+ 	@for a in `find * -type f | grep -e '\.${EXT_SO}$$' | grep -v lib/t | grep lib | grep -v /p/` ; do \
+-	  b=`echo $$a|cut -d / -f 2`; \
+-	  echo " ${LFX}/$$b.${LIBVERSION}"; \
+-	  ${INSTALL_LIB} $$a ${LFX}/$$b.${LIBVERSION} ; \
+-	  ( cd ${LFX} ; ln -fs $$b.${LIBVERSION} $$b ) ; \
++	  b=`echo $$a|cut -d / -f 2|sed -e 's,\.${EXT_SO},,g'`; \
++	  echo " ${LFX}/$$b.${LIBVERSION}.${EXT_SO}"; \
++	  ${INSTALL_LIB} $$a ${LFX}/$$b.${LIBVERSION}.${EXT_SO} ; \
++	  ( cd ${LFX} ; ln -fs $$b.${LIBVERSION}.${EXT_SO} $$b.${EXT_SO} ) ; \
+ 	done
+-	#Linux only? ( cd ${LFX} ; ln -fs $$b.${LIBVERSION} $$b.0 ; ln -fs $$b.0 $$b )
++	#Linux only? ( cd ${LFX} ; ln -fs $$b.${LIBVERSION}.${EXT_SO} $$b.0.${EXT_SO} ; ln -fs $$b.0.${EXT_SO} $$b.${EXT_SO} )
+ 	# object archives
+ 	@for a in `find * -type f | grep -e '\.a$$' | grep -v fs/p` ; do \
+ 	  echo " ${LFX}/$$a"; ${INSTALL_DATA} $$a ${LFX} ; done

Copied: users/g5pw/dports/devel/radare2/files/libr-config.mk.tail.diff (from rev 94752, users/g5pw/dports/devel/radare2/files/patch-libr-config.mk.tail.diff)
===================================================================
--- users/g5pw/dports/devel/radare2/files/libr-config.mk.tail.diff	                        (rev 0)
+++ users/g5pw/dports/devel/radare2/files/libr-config.mk.tail.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -0,0 +1,10 @@
+--- a/libr/config.mk.tail	2011-12-16 06:44:05.000000000 -0800
++++ b/libr/config.mk.tail	2011-12-16 12:45:09.000000000 -0800
+@@ -130,6 +130,6 @@
+ ifeq (${OSTYPE},windows)
+ libname=-shared -o $1.${EXT_SO}
+ else
+-libname=-shared -o $1.${EXT_SO} ${LDFLAGS_SONAME}$1.${EXT_SO}.${LIBVERSION}
++libname=-shared -o $1.${EXT_SO} ${LDFLAGS_SONAME}$1.${LIBVERSION}.${EXT_SO}
+ endif
+ endif

Copied: users/g5pw/dports/devel/radare2/files/libr-rules.mk.diff (from rev 94752, users/g5pw/dports/devel/radare2/files/patch-libr-rules.mk.diff)
===================================================================
--- users/g5pw/dports/devel/radare2/files/libr-rules.mk.diff	                        (rev 0)
+++ users/g5pw/dports/devel/radare2/files/libr-rules.mk.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -0,0 +1,20 @@
+--- a/libr/rules.mk	2011-12-16 06:44:05.000000000 -0800
++++ b/libr/rules.mk	2011-12-16 14:25:19.000000000 -0800
+@@ -19,7 +19,7 @@
+ SRC=$(subst .o,.c,$(OBJ))
+ 
+ ifeq (${OSTYPE},gnulinux)
+-LIBNAME=${LDFLAGS_SONAME}${LIBSO}.${LIBVERSION}
++LIBNAME=${LDFLAGS_SONAME}${LIBSO}
+ else
+ LIBNAME=${LDFLAGS_SONAME}${LIBSO}
+ endif
+@@ -102,7 +102,7 @@
+ all: ${BIN}${EXT_EXE}
+ 
+ ${BIN}${EXT_EXE}: ${OBJ}
+-	${CC} $+ -L.. ${LDFLAGS} ${LDLIBS} -o ${BIN}${EXT_EXE}
++	${CC} $+ -L.. ${LDFLAGS} ${LDLIBS} -headerpad_max_install_names -o ${BIN}${EXT_EXE}
+ endif
+ 
+ # Dummy myclean rule that can be overriden by the t/ Makefile

Copied: users/g5pw/dports/devel/radare2/files/mk-gcc.mk.diff (from rev 94752, users/g5pw/dports/devel/radare2/files/patch-mk-gcc.mk.diff)
===================================================================
--- users/g5pw/dports/devel/radare2/files/mk-gcc.mk.diff	                        (rev 0)
+++ users/g5pw/dports/devel/radare2/files/mk-gcc.mk.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -0,0 +1,11 @@
+--- a/mk/gcc.mk	2011-12-16 06:44:05.000000000 -0800
++++ b/mk/gcc.mk	2011-12-16 12:22:15.000000000 -0800
+@@ -19,7 +19,7 @@
+ #CFLAGS+=-arch ${ARCH}
+ #LDFLAGS+=-arch ${ARCH}
+ LDFLAGS_LIB=-dynamiclib
+-LDFLAGS_SONAME=-Wl,-install_name,
++LDFLAGS_SONAME=-Wl,-headerpad_max_install_names,-install_name,
+ else
+ LDFLAGS_LIB=-shared
+ #ifneq (${NAME},)

Deleted: users/g5pw/dports/devel/radare2/files/patch-libr-Makefile.diff
===================================================================
--- users/g5pw/dports/devel/radare2/files/patch-libr-Makefile.diff	2012-08-27 10:16:40 UTC (rev 97085)
+++ users/g5pw/dports/devel/radare2/files/patch-libr-Makefile.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -1,29 +0,0 @@
---- a/libr/Makefile	2011-12-16 06:44:05.000000000 -0800
-+++ b/libr/Makefile	2011-12-16 12:44:12.000000000 -0800
-@@ -54,7 +54,7 @@
- 	done
- 	for a in ${LIBLIST} ; do \
- 		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_SO} ${LFX}/libr_$${a}.${EXT_SO} ; \
--		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_SO} ${LFX}/libr_$${a}.${EXT_SO}.${LIBVERSION} ; \
-+		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_SO} ${LFX}/libr_$${a}.${LIBVERSION}.${EXT_SO} ; \
- 		ln -fs ${PWD}/$${a}/libr_$${a}.${EXT_AR} ${LFX}/libr_$${a}.${EXT_AR} ; \
- 		for b in $${a}/p/*.${EXT_SO} ; do \
- 			if [ -e ${PWD}/$${b} ] ; then \
-@@ -68,12 +68,12 @@
- 	# libraries
- 	@${INSTALL_DIR} ${LFX}
- 	@for a in `find * -type f | grep -e '\.${EXT_SO}$$' | grep -v lib/t | grep lib | grep -v /p/` ; do \
--	  b=`echo $$a|cut -d / -f 2`; \
--	  echo " ${LFX}/$$b.${LIBVERSION}"; \
--	  ${INSTALL_LIB} $$a ${LFX}/$$b.${LIBVERSION} ; \
--	  ( cd ${LFX} ; ln -fs $$b.${LIBVERSION} $$b ) ; \
-+	  b=`echo $$a|cut -d / -f 2|sed -e 's,\.${EXT_SO},,g'`; \
-+	  echo " ${LFX}/$$b.${LIBVERSION}.${EXT_SO}"; \
-+	  ${INSTALL_LIB} $$a ${LFX}/$$b.${LIBVERSION}.${EXT_SO} ; \
-+	  ( cd ${LFX} ; ln -fs $$b.${LIBVERSION}.${EXT_SO} $$b.${EXT_SO} ) ; \
- 	done
--	#Linux only? ( cd ${LFX} ; ln -fs $$b.${LIBVERSION} $$b.0 ; ln -fs $$b.0 $$b )
-+	#Linux only? ( cd ${LFX} ; ln -fs $$b.${LIBVERSION}.${EXT_SO} $$b.0.${EXT_SO} ; ln -fs $$b.0.${EXT_SO} $$b.${EXT_SO} )
- 	# object archives
- 	@for a in `find * -type f | grep -e '\.a$$' | grep -v fs/p` ; do \
- 	  echo " ${LFX}/$$a"; ${INSTALL_DATA} $$a ${LFX} ; done

Deleted: users/g5pw/dports/devel/radare2/files/patch-libr-config.mk.tail.diff
===================================================================
--- users/g5pw/dports/devel/radare2/files/patch-libr-config.mk.tail.diff	2012-08-27 10:16:40 UTC (rev 97085)
+++ users/g5pw/dports/devel/radare2/files/patch-libr-config.mk.tail.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -1,10 +0,0 @@
---- a/libr/config.mk.tail	2011-12-16 06:44:05.000000000 -0800
-+++ b/libr/config.mk.tail	2011-12-16 12:45:09.000000000 -0800
-@@ -130,6 +130,6 @@
- ifeq (${OSTYPE},windows)
- libname=-shared -o $1.${EXT_SO}
- else
--libname=-shared -o $1.${EXT_SO} ${LDFLAGS_SONAME}$1.${EXT_SO}.${LIBVERSION}
-+libname=-shared -o $1.${EXT_SO} ${LDFLAGS_SONAME}$1.${LIBVERSION}.${EXT_SO}
- endif
- endif

Deleted: users/g5pw/dports/devel/radare2/files/patch-libr-rules.mk.diff
===================================================================
--- users/g5pw/dports/devel/radare2/files/patch-libr-rules.mk.diff	2012-08-27 10:16:40 UTC (rev 97085)
+++ users/g5pw/dports/devel/radare2/files/patch-libr-rules.mk.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -1,20 +0,0 @@
---- a/libr/rules.mk	2011-12-16 06:44:05.000000000 -0800
-+++ b/libr/rules.mk	2011-12-16 14:25:19.000000000 -0800
-@@ -19,7 +19,7 @@
- SRC=$(subst .o,.c,$(OBJ))
- 
- ifeq (${OSTYPE},gnulinux)
--LIBNAME=${LDFLAGS_SONAME}${LIBSO}.${LIBVERSION}
-+LIBNAME=${LDFLAGS_SONAME}${LIBSO}
- else
- LIBNAME=${LDFLAGS_SONAME}${LIBSO}
- endif
-@@ -102,7 +102,7 @@
- all: ${BIN}${EXT_EXE}
- 
- ${BIN}${EXT_EXE}: ${OBJ}
--	${CC} $+ -L.. ${LDFLAGS} ${LDLIBS} -o ${BIN}${EXT_EXE}
-+	${CC} $+ -L.. ${LDFLAGS} ${LDLIBS} -headerpad_max_install_names -o ${BIN}${EXT_EXE}
- endif
- 
- # Dummy myclean rule that can be overriden by the t/ Makefile

Deleted: users/g5pw/dports/devel/radare2/files/patch-mk-gcc.mk.diff
===================================================================
--- users/g5pw/dports/devel/radare2/files/patch-mk-gcc.mk.diff	2012-08-27 10:16:40 UTC (rev 97085)
+++ users/g5pw/dports/devel/radare2/files/patch-mk-gcc.mk.diff	2012-08-27 10:31:48 UTC (rev 97086)
@@ -1,11 +0,0 @@
---- a/mk/gcc.mk	2011-12-16 06:44:05.000000000 -0800
-+++ b/mk/gcc.mk	2011-12-16 12:22:15.000000000 -0800
-@@ -19,7 +19,7 @@
- #CFLAGS+=-arch ${ARCH}
- #LDFLAGS+=-arch ${ARCH}
- LDFLAGS_LIB=-dynamiclib
--LDFLAGS_SONAME=-Wl,-install_name,
-+LDFLAGS_SONAME=-Wl,-headerpad_max_install_names,-install_name,
- else
- LDFLAGS_LIB=-shared
- #ifneq (${NAME},)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120827/5628fad6/attachment-0001.html>


More information about the macports-changes mailing list