Changeset 81786
- Timestamp:
- 08/04/11 16:32:00 (4 years ago)
- Location:
- users/pixilla/dports
- Files:
-
- 1 added
- 2 edited
- 4 copied
-
. (added)
-
_resources (copied) (copied from users/pixilla/_resources)
-
devel (copied) (copied from users/pixilla/devel)
-
devel/mp-shared-objects (copied) (copied from users/pixilla/devel/mp-shared-objects)
-
devel/mp-shared-objects/Portfile (modified) (2 diffs)
-
devel/mp-shared-objects/files/mp-shared-objects (modified) (4 diffs)
-
php (copied) (copied from users/pixilla/php)
Legend:
- Unmodified
- Added
- Removed
-
users/pixilla/dports/devel/mp-shared-objects/Portfile
r78776 r81786 6 6 7 7 name mp-shared-objects 8 version 0.0. 18 version 0.0.2 9 9 categories devel 10 10 platforms darwin 11 license GPL-211 license BEERWARE-42+ 12 12 maintainers pixilla 13 13 distfiles … … 18 18 homepage {} 19 19 master_sites {} 20 extract.mkdir yes 21 use_configure no 22 build { 23 set fp [open ${worksrcpath}/${name} w] 24 puts $fp \ 25 {#!/usr/bin/env bash 26 # Argument = [-q] <path name> 20 27 21 use_configure no 22 build {} 28 eError="error: no such path" 29 30 usage() 31 { 32 cat << EOF 33 34 usage: $(basename $0) options 35 36 This script runs otool -XL over the contents of a path: 37 \$ $(basename $0) -p /opt/local/lib/mysql5 38 or a MacPorts port name: 39 \$ $(basename $0) -p mysql5 -m 40 41 42 OPTIONS: 43 -h Show this message 44 -p Path or Port (requires -m) to check 45 -m Use -p as a port name rather then a path 46 -c Check if shared library exists, print "${eError}" if it does not 47 -q Quite, only print errors, implies -c 48 -s Stop on errors 49 50 EOF 51 } 52 53 [ -z $TYPE ] && TYPE=PATH 54 [ -z $CHECK_EXISTS ] && CHECK_EXISTS= 55 [ -z $QUITE ] && QUITE= 56 [ -z $STOP ] && STOP= 57 58 while getopts "hp:mcqs" OPTION 59 do 60 case $OPTION in 61 h) 62 usage 63 exit 1 64 ;; 65 p) 66 NAME=$OPTARG 67 ;; 68 m) 69 TYPE=PORT 70 ;; 71 c) 72 CHECK_EXISTS=yes 73 ;; 74 q) 75 QUITE=yes 76 CHECK_EXISTS=yes 77 ;; 78 s) 79 STOP=yes 80 ;; 81 ?) 82 usage 83 exit 84 ;; 85 esac 86 done 87 88 if [[ -z $NAME ]] 89 then 90 usage 91 exit 1 92 fi 93 94 IFS=$'\n' 95 if [ "${TYPE}" == "PATH" ] 96 then 97 FILES=( $(find "${NAME}" -type f) ) 98 fi 99 if [ "${TYPE}" == "PORT" ] 100 then 101 FILES=( $(port -q contents "${NAME}" | sed -e "s/^ *//") ) 102 fi 103 for (( fc = 0 ; fc < ${#FILES[@]} ; fc++ )) 104 do 105 if [[ ! -f "${FILES[$fc]}" && ! -d "${FILES[$fc]}" ]] 106 then 107 echo "FILE ${eError}: ${FILES[$fc]}" 108 break 1 109 fi 110 if [ ! -d "${FILES[$fc]}" ] 111 then 112 SHAREDLIBRARYS=( $(otool -XL "${FILES[$fc]}" | sed -e "s/^Archive.*//" | tr -d '\t' | awk '{print $1}') ) 113 if [[ ${#SHAREDLIBRARYS[@]} -gt 0 ]] 114 then 115 [ -z $QUITE ] && echo "${FILES[$fc]}" 116 for (( sc = 0 ; sc < ${#SHAREDLIBRARYS[@]} ; sc++ )) 117 do 118 if [ ! -f "${SHAREDLIBRARYS[$sc]}" ] 119 then 120 [ -n $QUITE ] && echo "${FILE[$fc]}" 121 echo "SHAREDLIBRARY ${eError}: ${SHAREDLIBRARYS[$sc]}" 122 [ "${STOP}" == "yes" ] && break 2 123 else 124 [ -z $QUITE ] && echo -e "\t${SHAREDLIBRARYS[$sc]}" 125 fi 126 done 127 fi 128 fi 129 done 130 unset IFS 131 unset NAME 132 unset CHECK_EXISTS 133 unset QUITE 134 } 135 close $fp 136 } 23 137 destroot { 24 138 xinstall -m 755 -W ${filespath} mp-shared-objects \ -
users/pixilla/dports/devel/mp-shared-objects/files/mp-shared-objects
r78776 r81786 22 22 -c Check if shared library exists, print "${eError}" if it does not 23 23 -q Quite, only print errors, implies -c 24 -s Stop on errors 24 25 25 26 EOF … … 29 30 [ -z $CHECK_EXISTS ] && CHECK_EXISTS= 30 31 [ -z $QUITE ] && QUITE= 32 [ -z $STOP ] && STOP= 31 33 32 while getopts "hp:mcq " OPTION34 while getopts "hp:mcqs" OPTION 33 35 do 34 36 case $OPTION in … … 49 51 QUITE=yes 50 52 CHECK_EXISTS=yes 53 ;; 54 s) 55 STOP=yes 51 56 ;; 52 57 ?) … … 91 96 [ -n $QUITE ] && echo "${FILE[$fc]}" 92 97 echo "SHAREDLIBRARY ${eError}: ${SHAREDLIBRARYS[$sc]}" 93 break 298 [ "${STOP}" == "yes" ] && break 2 94 99 else 95 100 [ -z $QUITE ] && echo -e "\t${SHAREDLIBRARYS[$sc]}"
Note: See TracChangeset
for help on using the changeset viewer.

