wok-6.x view gcc+gcj/receipt @ rev 25563

New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.37
author Stanislas Leduc <shann@slitaz.org>
date Fri May 05 18:12:18 2023 +0200 (18 months ago)
parents 544e47246b33
children
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 SOURCE="gcc"
5 VERSION="4.9.2"
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 # What is the latest version available today?
30 current_version()
31 {
32 wget -O - 'https://gcc.gnu.org/git/?p=gcc.git;a=summary' 2>/dev/null | \
33 sed '/ release/!d;s|.*GCC ||;s| release.*||' | sort -Vr | sed q
34 }
36 # Rules to configure and make the package.
37 compile_rules()
38 {
39 sed -i 's/@mkdir_p@/mkdir -p/' libjava/classpath/lib/copy-vmresources.sh.in
40 # Set HOST_SYSTEM if not defined in tazwok.conf as it should be
41 if [ -z "$HOST_SYSTEM" ] ; then
42 HOST_SYSTEM="$ARCH-slitaz-linux"
43 fi
44 GCC_TARGET=$HOST_SYSTEM
46 # Get ecj.jar needed to build gcj. We have to dl it each time from the
47 # sources repository to ensure that we receive the latest JAR.
48 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
49 if [ ! -f "$ECJ_JAR" ] ; then
50 echo "Downloading ECJ jar to: $(pwd)"
51 wget -c $ECJ_URL
52 # Exit if download failed to avoid errors.
53 if [ ! -f "$ECJ_JAR" ] ; then
54 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
55 return 1
56 fi
57 cp $ECJ_JAR $SOURCES_REPOSITORY
58 fi
60 # Use libiberty.a from binutils.
61 sed -i 's/install_to_$(INSTALL_DEST) //' \
62 $src/libiberty/Makefile.in || return 1
63 mkdir -p ../build && cd ../build
65 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/')
66 ../${src##*/}/configure --prefix=/usr --libexecdir=/usr/lib \
67 --infodir=/usr/share/info --mandir=/usr/share/man --enable-nls \
68 --enable-languages=c,c++,objc,java --enable-shared \
69 --with-system-zlib \
70 --enable-clocale=gnu --enable-objc-gc --enable-__cxa_atexit \
71 --enable-threads=posix --with-tune=$ARCH \
72 --enable-java-home --with-arch-directory=i386 \
73 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
74 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
75 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
76 --with-x --enable-java-awt=gtk \
77 --enable-gtk-cairo \
78 --enable-lto \
79 $CONFIGURE_ARGS $GCC_TARGET &&
80 make bootstrap &&
81 # Make install in the source tree to help creating derived pkgs
82 # and keep $_pkg variable set for genpkg.
83 make install
84 }
86 # Rules to gen a SliTaz package suitable for Tazpkg.
87 genpkg_rules()
88 {
89 mkdir -p $fs/usr/share
90 cp -a $install/usr/share/java $fs/usr/share
91 cp -a $install/usr/bin $fs/usr
92 # Copy all libs. Remove libgcc_s.so and libstdc++.so
93 # they goes in gcc-lib-base-$VERSION package.
94 cp -a $install/usr/lib $fs/usr
95 rm $fs/usr/lib/libgcc_s.so*
96 rm $fs/usr/lib/libstdc++.so*
97 rm $fs/usr/lib/libgomp.so*
98 #rm $fs/usr/lib/gcj-$VERSION-11/*.la
99 rm $fs/usr/lib/*.la
100 # Include files.
101 cp -a $install/usr/include $fs/usr
102 }
104 # Post install commands for Tazpkg.
105 post_install()
106 {
107 if [ ! -f "$1/lib/cpp" ] ; then
108 ln -s ../usr/bin/cpp "$1/lib"
109 fi
110 if [ ! -f "$1/usr/bin/cc" ] ; then
111 ln -s gcc "$1/usr/bin/cc"
112 fi
113 }