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