a project to simplify installation of open source software
on Mac OS X and Darwin
# $Id: Portfile 23027 2007-03-22 16:25:20Z pipping@macports.org $
PortSystem 1.0
name gcj34
version 3.4.6
categories lang devel java
maintainers nomaintainer@macports.org
description GNU Java compiler
long_description \
GCJ is a portable, optimizing, ahead-of-time compiler for the Java \
Programming Language. It can compile: Java source code directly to \
native machine code, Java source code to Java bytecode (class files), \
and Java bytecode to native machine code.
platforms darwin
homepage http://www.gnu.org/software/gcc/java/
distname gcc-${version}
master_sites gnu:gcc/${distname}
use_bzip2 yes
dist_subdir gcc
checksums md5 4a21ac777d4b5617283ce488b808da7b \
sha1 97b290fdc572c8e490b3b39f243e69bacad23c2b \
rmd160 b15003368cedc7964f6ceaee0c39ddc43a46c442
worksrcdir ${distname}/build
depends_lib port:libiconv port:zlib
patchfiles patch-libjava_libltdl_ltmain.sh patch-ltmain.sh
pre-patch {
xinstall -d ${worksrcpath}
}
set gcjBaseDir ${prefix}/${name}-${version}
configure.cmd ${worksrcpath}/../configure
configure.env CPPFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib" \
LIBS=-liconv
configure.pre_args --prefix=${gcjBaseDir}
configure.args --enable-languages=c++,java --disable-nls \
--with-system-zlib --mandir=${gcjBaseDir}/share/man \
--infodir=${gcjBaseDir}/share/info \
--with-local-prefix=${gcjBaseDir}
build.target bootstrap-lean
# Since we install in a subdir dedicated to gcj, this gets it visibility
post-destroot {
cd ${destroot}${prefix}/${name}-${version}/share/man/
foreach n {1 7} {
foreach f [glob man${n}/*.${n}] {
system "gzip -9 ${f}"
}
}
set gcjLinkFiles { gcj gcjh gij grepjar jcf-dump jv-convert jv-scan }
cd ${destroot}/${prefix}/bin
foreach gcjBinFile ${gcjLinkFiles} {
system "ln -s ../${name}-${version}/bin/${gcjBinFile} ."
}
cd ${destroot}/${prefix}/share/man/man1
foreach gcjManFile ${gcjLinkFiles} {
system "ln -s \
../../../${name}-${version}/share/man/man1/${gcjManFile}.1.gz ."
}
xinstall -m 755 -d ${destroot}/${prefix}/lib/pkgconfig
cd ${destroot}/${prefix}/lib/pkgconfig
system "ln -s ../../${name}-${version}/lib/pkgconfig/libgcj.pc ."
}
platform darwin 8 {
patchfiles-append patch-gcc_config_darwin.h
}