wok-next view gcc+gcj/receipt @ rev 21294
updated netsurf (3.8 -> 3.9)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Dec 09 07:42:31 2019 +0100 (2019-12-09) |
parents | 5669e8b3be70 |
children |
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 xorgproto \
23 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="$(python2 -c 'import os; print os.path.dirname(os.__file__)')"
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=$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 libcairo expat fontconfig freetype pango pixman libpng \
102 libxcb xcb-util libice libsm libx11 libxau \
103 libxcomposite libxcursor libxdamage libxdmcp \
104 libxext libxfixes libxinerama libxrandr libxrender \
105 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 }