[28042] users/pipping
source_changes at macosforge.org
source_changes at macosforge.org
Sat Aug 18 22:14:39 PDT 2007
Revision: 28042
http://trac.macosforge.org/projects/macports/changeset/28042
Author: pipping at macports.org
Date: 2007-08-18 22:14:39 -0700 (Sat, 18 Aug 2007)
Log Message:
-----------
r75: make test scripts silent, use a loop for openssl to avoid repetition
r76: rename special_copy to forked_copy, do not strip the compatibility version from linked libraries
r77: Add & modify comments ( capitalize, remove typos, etc. )
r78: add a ( tiny ) readme
Modified Paths:
--------------
users/pipping/build_coreutils.sh
users/pipping/build_libpng.sh
users/pipping/build_openssl.sh
users/pipping/merge.rb
Added Paths:
-----------
users/pipping/README
Added: users/pipping/README
===================================================================
--- users/pipping/README (rev 0)
+++ users/pipping/README 2007-08-19 05:14:39 UTC (rev 28042)
@@ -0,0 +1,11 @@
+The subversion repository can be found at
+
+ http://elias.svn.binera.de
+
+The wiki can be found at
+
+ http://elias.binera.de/dokuwiki/
+
+The bug tracker can be found at
+
+ http://elias.binera.de/bugzilla/
Modified: users/pipping/build_coreutils.sh
===================================================================
--- users/pipping/build_coreutils.sh 2007-08-19 05:11:36 UTC (rev 28041)
+++ users/pipping/build_coreutils.sh 2007-08-19 05:14:39 UTC (rev 28042)
@@ -4,10 +4,10 @@
TOP_DIR=/tmp
TARGET=$TOP_DIR/coreutils
-MAKEOPTS='-s -j3'
+MAKEOPTS='-j3'
mkdir $TARGET
cd $TARGET
-curl -O ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.9.tar.bz2
+curl -s -O ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.9.tar.bz2
for arch in ppc ppc64 i386 x86_64 ; do
cd $TARGET
@@ -19,13 +19,15 @@
export LDFLAGS="-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib -arch ${arch}"
if [ "${arch}" == "${arch/ppc/}" ]; then
- ./configure --quiet --host=${arch}-apple-darwin ac_cv_c_bigendian=yes
+ ./configure \
+ --host=${arch}-apple-darwin ac_cv_c_bigendian=yes &>/dev/null
else
- ./configure --quiet --host=${arch}-apple-darwin ac_cv_c_bigendian=no
+ ./configure \
+ --host=${arch}-apple-darwin ac_cv_c_bigendian=no &>/dev/null
fi
- make $MAKEOPTS
- make $MAKEOPTS install DESTDIR=$TARGET/${arch}
+ make $MAKEOPTS &>/dev/null
+ make $MAKEOPTS install DESTDIR=$TARGET/${arch} &>/dev/null
cd $TARGET
rm -rf build_${arch}
Modified: users/pipping/build_libpng.sh
===================================================================
--- users/pipping/build_libpng.sh 2007-08-19 05:11:36 UTC (rev 28041)
+++ users/pipping/build_libpng.sh 2007-08-19 05:14:39 UTC (rev 28042)
@@ -4,10 +4,10 @@
TOP_DIR=/tmp
TARGET=$TOP_DIR/libpng
-MAKEOPTS='-s -j3'
+MAKEOPTS='-j3'
mkdir $TARGET
cd $TARGET
-curl -O http://switch.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.18.tar.bz2
+curl -s -O http://switch.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.18.tar.bz2
for arch in ppc i386 ppc64 x86_64; do
cd $TARGET
@@ -18,10 +18,10 @@
export CPPFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/usr/include -arch ${arch}"
export LDFLAGS="-L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib -arch ${arch}"
- ./configure --quiet --host=${arch}-apple-darwin
+ ./configure --host=${arch}-apple-darwin &> /dev/null
- make $MAKEOPTS
- make $MAKEOPTS install DESTDIR=$TARGET/${arch}
+ make $MAKEOPTS &>/dev/null
+ make $MAKEOPTS install DESTDIR=$TARGET/${arch} &>/dev/null
cd $TARGET
rm -rf build_${arch}
Modified: users/pipping/build_openssl.sh
===================================================================
--- users/pipping/build_openssl.sh 2007-08-19 05:11:36 UTC (rev 28041)
+++ users/pipping/build_openssl.sh 2007-08-19 05:14:39 UTC (rev 28042)
@@ -6,34 +6,23 @@
TARGET=$TOP_DIR/openssl
mkdir $TARGET
cd $TARGET
-curl -O ftp://ftp.openssl.org/source/openssl-0.9.8e.tar.gz
+curl -s -O ftp://ftp.openssl.org/source/openssl-0.9.8e.tar.gz
-mkdir build_ppc
-tar -C build_ppc -xzf openssl-0.9.8e.tar.gz
-cd build_ppc/openssl-0.9.8e
-./Configure darwin-ppc-cc no-zlib shared no-asm
-/usr/bin/sed -i '' -e 's/\(^CFLAG.*$\)/\1 -arch ppc/' Makefile
-/usr/bin/sed -i '' \
- -e 's/\(^LDFLAGS=.*$\)/\1 -arch ppc/' \
- -e 's/\(^SHARED_LDFLAGS=.*$\)/\1 -arch ppc/' \
- Makefile.shared
-make -s && make -s install INSTALL_PREFIX=$TARGET/ppc
+for i in ppc i386; do
+ mkdir build_$i
+ tar -C build_$i -xzf openssl-0.9.8e.tar.gz
+ cd build_$i/openssl-0.9.8e
+ ./Configure darwin-$i-cc no-zlib shared no-asm &>/dev/null
+ /usr/bin/sed -i '' -e "s/\(^CFLAG.*$\)/\1 -arch $i/" Makefile
+ /usr/bin/sed -i '' \
+ -e "s/\(^LDFLAGS=.*$\)/\1 -arch $i/" \
+ -e "s/\(^SHARED_LDFLAGS=.*$\)/\1 -arch $i/" \
+ Makefile.shared
+ make &>/dev/null
+ make install INSTALL_PREFIX=$TARGET/$i &>/dev/null
-cd $TARGET
-rm -rf build_ppc
+ cd $TARGET
+ rm -rf build_$i
+done;
-mkdir build_i386
-tar -C build_i386 -xzf openssl-0.9.8e.tar.gz
-cd build_i386/openssl-0.9.8e
-./Configure darwin-i386-cc no-zlib shared no-asm
-/usr/bin/sed -i '' -e 's/\(^CFLAG.*$\)/\1 -arch i386/' Makefile
-/usr/bin/sed -i '' \
- -e 's/\(^LDFLAGS=.*$\)/\1 -arch i386/' \
- -e 's/\(^SHARED_LDFLAGS=.*$\)/\1 -arch i386/' \
- Makefile.shared
-make -s && make -s install INSTALL_PREFIX=$TARGET/i386
-
-cd $TARGET
-rm -rf build_i386
-
rm openssl-0.9.8e.tar.gz
Modified: users/pipping/merge.rb
===================================================================
--- users/pipping/merge.rb 2007-08-19 05:11:36 UTC (rev 28041)
+++ users/pipping/merge.rb 2007-08-19 05:14:39 UTC (rev 28042)
@@ -26,13 +26,13 @@
module Helpers
def true_for_all?( filePath, includeFirst )
- # checks if a predicate is true for all (but the first) architecture
+ # Checks if a predicate is true for all (but the first) architecture
iterand = includeFirst ? @args : @args[1..-1]
iterand.all? {|arch| yield( @options.input + arch + filePath, arch )}
end
end
-# these ruby 1.9 extensions come in handy. in case we are running ruby 1.8 we
+# These Ruby 1.9 extensions come in handy. In case we are Running ruby 1.8 we
# just define them ourselves
class String
unless self.method_defined?( :start_with? )
@@ -56,7 +56,7 @@
class MergeArguments
def self.parse( arguments )
- # set up defaults
+ # Set up defaults
options = OpenStruct.new
options.dryrun = false
@@ -126,7 +126,7 @@
end
def create_directory( prefix, dir )
- # creates a directory
+ # Creates a directory
prefixed = prefix + dir
unless prefixed.exist?
prefixed.mkpath unless @options.dryrun
@@ -137,7 +137,7 @@
end
def copy( filePath )
- # copies a file
+ # Copies a file
origin = @options.input + @args[0] + filePath
target = @options.output + filePath
unless target.exist?
@@ -149,7 +149,7 @@
end
def consistent?( path, string )
- # checks if a file has the correct type and architecture across all trees
+ # Checks if a file has the correct type and architecture across all trees
type_matches = true_for_all?( path, true ) {|filePath, arch|
fileCallOutput = %x{ #{ $FILE } -b "#{ filePath }" }.chomp
fileCallOutput.start_with?( string )
@@ -162,7 +162,7 @@
end
def lipo( filePath )
- # glues single-architecture files together using lipo(1)
+ # Glues single-architecture files together using lipo(1)
lipoArgs = Array.new
@args.each {|arch|
lipoArgs << '-arch %s %s' % [ arch, @options.input + arch + filePath ]
@@ -178,7 +178,7 @@
end
def make_wrapper( filePath, first )
- # creates a wrapper for config scripts that differ across trees
+ # Creates a wrapper for a config script that differs across trees
wrapperTarget = @options.output + filePath
unless wrapperTarget.exist?
wrapperTarget.open( 'w' ) {|wrapper|
@@ -199,8 +199,8 @@
end
end
- def special_copy( origin, target, logPath )
- # copies files
+ def forked_copy( origin, target, logPath )
+ # Copies files more flexibly than 'copy' at the cost of a clear interface
unless target.exist?
FileUtils.cp( origin, target, :noop => @options.dryrun )
@log.debug( 'forked : %s' % logPath )
@@ -212,6 +212,9 @@
public
def handle_file( subPath )
+ # Decides what action should be take for a file (skip/copy/merge) and
+ # invokes the corresponding commands
+
# firstPath is used so we have something we can compare other
# architecture's versions of the file we are processing with.
firstPath = @options.input + @args[0] + subPath
@@ -222,7 +225,7 @@
false
end
}
- # A file is either missing from at least on of the single-architecture
+ # A file is either missing from at least one of the single-architecture
# directories or not all versions of the file have the same type.
@log.warn( 'skipped: %s' % subPath )
else
@@ -268,16 +271,16 @@
)
}
}
- @log.debug( 'merged: %s' % subPath )
+ @log.debug( 'merged : %s' % subPath )
else
- @log.debug( 'exists: %s' % subPath )
+ @log.debug( 'exists : %s' % subPath )
end
# Handle file type: pkg-config file
when '.pc'
@args.each {|arch|
subArch = subPath.dirname + arch + subPath.basename
create_directory( @options.output, subArch.dirname )
- special_copy(
+ forked_copy(
@options.input + arch + subPath,
@options.output + subArch, subArch
)
@@ -325,9 +328,7 @@
} -arch #{ arch } -LX #{
@options.input + arch + subPath
}
- }.entries.collect {|library|
- library.strip.gsub( %r{ \(compatibility version.+\)}, '' )
- }.reject {|line|
+ }.entries.collect {|library| library.lstrip }.reject {|line|
line.start_with?( '/usr/lib' )
}.to_set
}
@@ -349,7 +350,7 @@
@args.each {|arch|
subArch = subPath.dirname + arch + subPath.basename
create_directory( @options.output, subArch.dirname )
- special_copy(
+ forked_copy(
@options.input + arch + subPath,
@options.output + subArch, subArch
)
@@ -373,7 +374,7 @@
def initialize
@options = MergeArguments.parse( ARGV )
- # ignore duplicates and trailing slashes
+ # Ignore duplicates and trailing slashes
@args = ARGV.collect {|arg| arg.chomp( '/' )}.uniq
@ORIGIN = Pathname.pwd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070818/472b8d61/attachment.html
More information about the macports-changes
mailing list