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

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents f48456621a9d
children aa1e58c82d61
line source
1 # SliTaz package receipt.
3 PACKAGE="gcc+gcj"
4 VERSION="4.6.3"
5 CATEGORY="development"
6 SHORT_DESC="The GNU Compiler Collection, including the gcj Compiler for Java"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://gcc.gnu.org/"
10 REPOLOGY="gcc"
12 TARBALL="gcc-$VERSION.tar.bz2"
13 WGET_URL="$GNU_MIRROR/gcc/gcc-$VERSION/$TARBALL"
15 ECJ_JAR="ecj-latest.jar"
16 ECJ_URL="ftp://sourceware.org/pub/java/$ECJ_JAR"
17 EXTRA_SOURCE_FILES="$ECJ_JAR"
18 PROVIDE="gcc jre jdk"
19 TAGS="compiler C C++ objective-C java"
21 BUILD_DEPENDS="glibc-dev gawk flex python perl gmp gmp-dev mpfr mpfr-dev mpc-library \
22 expat-dev zlib-dev fastjar gtk2-dev libart_lgpl-dev xorg-dev xorg-xorgproto \
23 xorg-libXtst \
24 elfutils elfutils-dev util-linux-uuid-dev"
26 compile_rules() {
27 sed -i 's/@mkdir_p@/mkdir -p/' libjava/classpath/lib/copy-vmresources.sh.in
28 # Set HOST_SYSTEM if not defined in tazwok.conf as it should be
29 if [ -z "$HOST_SYSTEM" ]; then
30 HOST_SYSTEM="$ARCH-slitaz-linux"
31 fi
32 GCC_TARGET=$HOST_SYSTEM
34 # Get ecj.jar needed to build gcj. We have to dl it each time from the
35 # sources repository to ensure that we receive the latest JAR.
36 # (See http://gcc.gnu.org/install/configure.html --with-ecj-jar)
37 if [ ! -f "$ECJ_JAR" ]; then
38 echo "Downloading ECJ jar to: $(pwd)"
39 wget -c $ECJ_URL
40 # Exit if download failed to avoid errors.
41 if [ ! -f "$ECJ_JAR" ]; then
42 echo -e "\nECJ jar download failed, exiting. Please check ECJ_URL variable.\n"
43 return 1
44 fi
45 cp $ECJ_JAR $SRC
46 fi
48 # Use libiberty.a from binutils.
49 sed -i 's/install_to_$(INSTALL_DEST) //' \
50 $src/libiberty/Makefile.in || return 1
51 mkdir -p ../build && cd ../build
53 PYTHON_LIB=python$(grep ^VERSION= $WOK/python/receipt | sed 's/.*"\(...\).*/\1/') #'
55 ../${src##*/}/configure \
56 --prefix=/usr \
57 --libexecdir=/usr/lib \
58 --infodir=/usr/share/info \
59 --mandir=/usr/share/man \
60 --enable-nls \
61 --enable-languages=c,c++,objc,java \
62 --enable-shared \
63 --with-system-zlib \
64 --enable-clocale=gnu \
65 --enable-objc-gc \
66 --enable-__cxa_atexit \
67 --enable-threads=posix \
68 --with-tune=$ARCH \
69 --enable-java-home \
70 --with-arch-directory=i386 \
71 --with-jvm-root-dir=/usr/lib/jvm/java-gcj \
72 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-gcj \
73 --with-python-dir=/usr/lib/$PYTHON_LIB/site-packages \
74 --with-x \
75 --enable-java-awt=gtk \
76 --enable-gtk-cairo \
77 --enable-lto \
78 $GCC_TARGET \
79 $CONFIGURE_ARGS &&
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 genpkg_rules() {
87 mkdir -p $fs/usr/share
88 cp -a $install/usr/share/java $fs/usr/share
89 cp -a $install/usr/bin $fs/usr
90 # Copy all libs. Remove libgcc_s.so and libstdc++.so
91 # they goes in gcc-lib-base-$VERSION package.
92 cp -a $install/usr/lib $fs/usr
93 rm $fs/usr/lib/libgcc_s.so*
94 rm $fs/usr/lib/libstdc++.so*
95 rm $fs/usr/lib/libgomp.so*
96 #rm $fs/usr/lib/gcj-$VERSION-11/*.la
97 rm $fs/usr/lib/*.la
98 # Include files.
99 cp -a $install/usr/include $fs/usr
100 DEPENDS="glibc-base glib gcc-lib-base util-linux-uuid zlib libgomp gmp mpfr \
101 python gtk2 atk cairo expat fontconfig freetype pango xorg-pixman libpng16 \
102 xorg-libxcb xorg-xcb-util xorg-libICE xorg-libSM xorg-libX11 xorg-libXau \
103 xorg-libXcomposite xorg-libXcursor xorg-libXdamage xorg-libXdmcp \
104 xorg-libXext xorg-libXfixes xorg-libXinerama xorg-libXrandr xorg-libXrender \
105 xorg-libXtst alsa-lib elfutils"
106 }
108 post_install() {
109 if [ ! -f "$1/lib/cpp" ]; then
110 ln -s ../usr/bin/cpp "$1/lib"
111 fi
112 if [ ! -f "$1/usr/bin/cc" ]; then
113 ln -s gcc "$1/usr/bin/cc"
114 fi
115 }