wok-next view gcc+gcj/receipt @ rev 15342

mplayerplug-in, gecko-mediaplayer: add -I/usr/include/nspr
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 29 15:05:37 2013 +0000 (2013-09-29)
parents 380ffe05937a
children 861d91e915a4
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 SOURCE="gcc"
5 VERSION="4.6.3"
6 CATEGORY="development"
7 SHORT_DESC="The GNU Compiler Collection, including the gcj Compiler for Java."
8 MAINTAINER="rcx@zoominternet.net"
9 LICENSE="GPL2"
10 TARBALL="$SOURCE-$VERSION.tar.bz2"
11 WEB_SITE="http://gcc.gnu.org/java/"
12 WGET_URL="$GNU_MIRROR/$SOURCE/$SOURCE-$VERSION/$TARBALL"
13 PROVIDE="$SOURCE jre jdk"
14 TAGS="compiler C C++ objective-C java"
16 DEPENDS="glibc-base glib gcc-lib-base libgio util-linux-uuid zlib libgomp gmp mpfr python \
17 gtk+ atk cairo expat fontconfig freetype pango pixman libpng libxcb xcb-util \
18 xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
19 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
20 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXtst alsa-lib elfutils"
21 BUILD_DEPENDS="glibc-dev gawk flex python perl gmp gmp-dev mpfr mpfr-dev mpc-library \
22 expat-dev zlib-dev fastjar gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto \
23 xorg-kbproto xorg-libXtst xorg-randrproto xorg-renderproto xorg-xextproto xorg-xproto \
24 elfutils elfutils-dev"
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 cd $src
30 # Set HOST_SYSTEM if not defined in tazwok.conf as it should be
31 if [ -z "$HOST_SYSTEM" ] ; then
32 HOST_SYSTEM="$ARCH-slitaz-linux"
33 fi
34 GCC_TARGET=$HOST_SYSTEM
36 # Get ecj.jar needed to build gcj. We have to dl it each time from the
37 # sources repository to ensure that we receive the latest JAR.
38 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
39 ECJ_JAR="ecj-latest.jar"
40 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
41 if [ ! -f "$ECJ_JAR" ] ; then
42 echo "Downloading ECJ jar to: $(pwd)"
43 wget -c $ECJ_URL
44 # Exit if download failed to avoid errors.
45 if [ ! -f "$ECJ_JAR" ] ; then
46 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
47 return 1
48 fi
49 fi
51 # Use libiberty.a from binutils.
52 sed -i 's/install_to_$(INSTALL_DEST) //' \
53 $src/libiberty/Makefile.in || return 1
54 mkdir -p ../build && cd ../build
56 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
57 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \
58 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
59 --enable-languages=c,c++,objc,java --enable-shared \
60 --with-system-zlib \
61 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
62 --enable-threads=posix --with-tune=$ARCH \
63 --enable-java-home --with-arch-directory=i386 \
64 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
65 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
66 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
67 --with-x --enable-java-awt=gtk \
68 --enable-gtk-cairo \
69 --enable-lto \
70 $CONFIGURE_ARGS $GCC_TARGET &&
71 make bootstrap &&
72 # Make install in the source tree to help creating derived pkgs
73 # and keep $_pkg variable set for genpkg.
74 make install
75 }
77 # Rules to gen a SliTaz package suitable for Tazpkg.
78 genpkg_rules()
79 {
80 mkdir -p $fs/usr/share
81 cp -a $install/usr/share/java $fs/usr/share
82 cp -a $install/usr/bin $fs/usr
83 # Copy all libs. Remove libgcc_s.so and libstdc++.so
84 # they goes in gcc-lib-base-$VERSION package.
85 cp -a $install/usr/lib $fs/usr
86 rm $fs/usr/lib/libgcc_s.so*
87 rm $fs/usr/lib/libstdc++.so*
88 rm $fs/usr/lib/libgomp.so*
89 #rm $fs/usr/lib/gcj-$VERSION-11/*.la
90 rm $fs/usr/lib/*.la
91 # Include files.
92 cp -a $install/usr/include $fs/usr
93 }
95 # Post install commands for Tazpkg.
96 post_install()
97 {
98 local root
99 root=$1
100 echo "Processing post-install commands..."
101 if [ ! -f "$root/lib/cpp" ] ; then
102 ln -s ../usr/bin/cpp $root/lib
103 fi
104 if [ ! -f "$root/usr/bin/cc" ] ; then
105 ln -s gcc $root/usr/bin/cc
106 fi
107 }