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