wok-current view gcc+gcj/receipt @ rev 21733
updated pv (1.1.4 -> 1.6.6)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Jun 13 13:27:36 2019 +0100 (2019-06-13) |
parents | 5b16e60b3d24 |
children | 544e47246b33 |
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 ECJ_JAR="ecj-latest.jar"
14 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
15 EXTRA_SOURCE_FILES="$ECJ_JAR"
16 PROVIDE="$SOURCE jre jdk"
17 TAGS="compiler C C++ objective-C java"
19 DEPENDS="glibc-base glib gcc-lib-base libgio util-linux-uuid zlib libgomp gmp mpfr python \
20 gtk+ atk cairo expat fontconfig freetype pango pixman libpng libxcb xcb-util \
21 xorg-libICE xorg-libSM xorg-libX11 xorg-libXau xorg-libXcomposite \
22 xorg-libXcursor xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes \
23 xorg-libXinerama xorg-libXrandr xorg-libXrender xorg-libXtst alsa-lib elfutils"
24 BUILD_DEPENDS="glibc-dev gawk flex python perl gmp gmp-dev mpfr mpfr-dev mpc-library \
25 expat-dev zlib-dev fastjar gtk+-dev libart_lgpl-dev xorg-dev xorg-inputproto \
26 xorg-kbproto xorg-libXtst xorg-randrproto xorg-renderproto xorg-xextproto xorg-xproto \
27 elfutils elfutils-dev util-linux-uuid-dev"
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 sed -i 's/@mkdir_p@/mkdir -p/' libjava/classpath/lib/copy-vmresources.sh.in
33 # Set HOST_SYSTEM if not defined in tazwok.conf as it should be
34 if [ -z "$HOST_SYSTEM" ] ; then
35 HOST_SYSTEM="$ARCH-slitaz-linux"
36 fi
37 GCC_TARGET=$HOST_SYSTEM
39 # Get ecj.jar needed to build gcj. We have to dl it each time from the
40 # sources repository to ensure that we receive the latest JAR.
41 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
42 if [ ! -f "$ECJ_JAR" ] ; then
43 echo "Downloading ECJ jar to: $(pwd)"
44 wget -c $ECJ_URL
45 # Exit if download failed to avoid errors.
46 if [ ! -f "$ECJ_JAR" ] ; then
47 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
48 return 1
49 fi
50 cp $ECJ_JAR $SOURCES_REPOSITORY
51 fi
53 # Use libiberty.a from binutils.
54 sed -i 's/install_to_$(INSTALL_DEST) //' \
55 $src/libiberty/Makefile.in || return 1
56 mkdir -p ../build && cd ../build
58 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
59 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \
60 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
61 --enable-languages=c,c++,objc,java --enable-shared \
62 --with-system-zlib \
63 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
64 --enable-threads=posix --with-tune=$ARCH \
65 --enable-java-home --with-arch-directory=i386 \
66 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
67 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
68 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
69 --with-x --enable-java-awt=gtk \
70 --enable-gtk-cairo \
71 --enable-lto \
72 $CONFIGURE_ARGS $GCC_TARGET &&
73 make bootstrap &&
74 # Make install in the source tree to help creating derived pkgs
75 # and keep $_pkg variable set for genpkg.
76 make install
77 }
79 # Rules to gen a SliTaz package suitable for Tazpkg.
80 genpkg_rules()
81 {
82 mkdir -p $fs/usr/share
83 cp -a $install/usr/share/java $fs/usr/share
84 cp -a $install/usr/bin $fs/usr
85 # Copy all libs. Remove libgcc_s.so and libstdc++.so
86 # they goes in gcc-lib-base-$VERSION package.
87 cp -a $install/usr/lib $fs/usr
88 rm $fs/usr/lib/libgcc_s.so*
89 rm $fs/usr/lib/libstdc++.so*
90 rm $fs/usr/lib/libgomp.so*
91 #rm $fs/usr/lib/gcj-$VERSION-11/*.la
92 rm $fs/usr/lib/*.la
93 # Include files.
94 cp -a $install/usr/include $fs/usr
95 }
97 # Post install commands for Tazpkg.
98 post_install()
99 {
100 if [ ! -f "$1/lib/cpp" ] ; then
101 ln -s ../usr/bin/cpp "$1/lib"
102 fi
103 if [ ! -f "$1/usr/bin/cc" ] ; then
104 ln -s gcc "$1/usr/bin/cc"
105 fi
106 }