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

g5pw at macports.org g5pw at macports.org
Mon May 21 13:50:49 PDT 2012


Revision: 93403
          https://trac.macports.org/changeset/93403
Author:   g5pw at macports.org
Date:     2012-05-21 13:50:49 -0700 (Mon, 21 May 2012)
Log Message:
-----------
devel/radare2:
added the file, modified portfile to use the .sh extension of the file.

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

Added Paths:
-----------
    users/g5pw/dports/devel/radare2/files/change_install_names.sh

Removed Paths:
-------------
    users/g5pw/dports/devel/radare2/files/patch-change_install_names.diff

Modified: users/g5pw/dports/devel/radare2/Portfile
===================================================================
--- users/g5pw/dports/devel/radare2/Portfile	2012-05-21 20:46:00 UTC (rev 93402)
+++ users/g5pw/dports/devel/radare2/Portfile	2012-05-21 20:50:49 UTC (rev 93403)
@@ -32,7 +32,7 @@
 
 post-destroot {
     # Fix link lib paths
-    system -W ${filespath} "sh change_install_names ${destroot}"
+    system -W ${filespath} "sh change_install_names.sh ${destroot}"
 }
 
 livecheck.type      regex

Copied: users/g5pw/dports/devel/radare2/files/change_install_names.sh (from rev 92660, users/g5pw/dports/devel/radare2/files/patch-change_install_names.diff)
===================================================================
--- users/g5pw/dports/devel/radare2/files/change_install_names.sh	                        (rev 0)
+++ users/g5pw/dports/devel/radare2/files/change_install_names.sh	2012-05-21 20:50:49 UTC (rev 93403)
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# Be verbose.
+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

Deleted: users/g5pw/dports/devel/radare2/files/patch-change_install_names.diff
===================================================================
--- users/g5pw/dports/devel/radare2/files/patch-change_install_names.diff	2012-05-21 20:46:00 UTC (rev 93402)
+++ users/g5pw/dports/devel/radare2/files/patch-change_install_names.diff	2012-05-21 20:50:49 UTC (rev 93403)
@@ -1,77 +0,0 @@
---- a/change_install_names	1969-12-31 16:00:00.000000000 -0800
-+++ b/change_install_names	2011-12-19 18:27:40.000000000 -0800
-@@ -0,0 +1,74 @@
-+#!/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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120521/c46640ff/attachment.html>


More information about the macports-changes mailing list