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

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