wok-next annotate emacs/receipt @ rev 5582

emacs: GCC 4.5.0 workaround
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 16 10:20:33 2010 +0200 (2010-05-16)
parents a878a8e4e836
children 6ab992fa15c1
rev   line source
domcox@1046 1 # SliTaz package receipt.
domcox@1046 2
domcox@1046 3 PACKAGE="emacs"
domcox@5578 4 VERSION="23.2"
domcox@1046 5 CATEGORY="development"
domcox@1046 6 SHORT_DESC="The GNU Emacs editor"
domcox@3938 7 MAINTAINER="domcox@slitaz.org"
domcox@5578 8 DEPENDS="atk cairo dbus expat freetype fontconfig giflib glib gtk+ jpeg libgio libpng \
domcox@5578 9 librsvg util-linux-ng-uuid ncurses pango tiff xorg-server zlib librsvg libgsf"
domcox@5578 10 BUILD_DEPENDS="atk-dev cairo-dev expat-dev dbus-dev freetype-dev fontconfig-dev \
domcox@5578 11 giflib-dev glib-dev gtk+-dev jpeg-dev libgio-dev libpng-dev librsvg-dev ncurses-dev \
domcox@5578 12 pango-dev pkg-config tiff-dev xorg-dev xorg-dev-proto"
pascal@5000 13 SUGGESTED="alsa-lib"
domcox@1046 14 TARBALL="$PACKAGE-$VERSION.tar.gz"
domcox@1046 15 WEB_SITE="http://www.gnu.org/software/emacs/"
domcox@1046 16 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
jozee@4935 17 TAGS="text-editor"
domcox@1046 18
domcox@1046 19 # Rules to configure and make the package.
domcox@1046 20 compile_rules()
domcox@1046 21 {
domcox@1046 22 cd $src
domcox@1046 23 # Gzip workaround in busybox
domcox@1900 24 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' Makefile.in
domcox@1900 25 sed -i 's/${GZIP_PROG} -9n/${GZIP_PROG}/g' leim/Makefile.in
pascal@5582 26 # Configure (with GCC 4.5.0 workaround)
pascal@5582 27 CFLAGS="-g -O2 -fno-optimize-sibling-calls" ./configure $CONFIGURE_ARGS \
domcox@3938 28 --infodir=/usr/share/emacs/info \
domcox@3938 29 --mandir=/usr/share/man \
domcox@3938 30 --without-makeinfo \
domcox@3938 31 --with-sound \
domcox@3938 32 --with-x \
domcox@3938 33 --with-toolkit-scroll-bars \
domcox@3938 34 --with-xpm=yes \
domcox@3938 35 --libexecdir=/usr/lib \
domcox@3938 36 --localstatedir=/var/lib \
domcox@3938 37 --sharedstatedir=/var/lib \
domcox@3938 38 --prefix=/usr && \
domcox@3938 39 make && \
domcox@1046 40 make DESTDIR=$PWD/_pkg install
domcox@1046 41 }
domcox@1046 42
domcox@1046 43 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@1046 44 genpkg_rules()
domcox@1046 45 {
domcox@1046 46 # Binary files
domcox@3938 47 BIN_FILES="b2m ctags ebrowse emacs emacsclient etags grep-changelog rcs-checkin"
domcox@3938 48 echo -n "Copying emacs binary files"
domcox@3938 49 mkdir -p $fs/usr/bin && \
domcox@3938 50 for file in $BIN_FILES; do
domcox@3938 51 cp -a $_pkg/usr/bin/$file $fs/usr/bin
domcox@3938 52 done
domcox@3938 53 status
domcox@3938 54 # Lib files
domcox@3938 55 echo -n "Copying emacs lib files"
domcox@3938 56 cp -a $_pkg/usr/lib $fs/usr
domcox@3938 57 status
domcox@3938 58 strip -s $fs/usr/lib/$PACKAGE/$VERSION/i486-pc-linux-gnu/* 2> /dev/null
domcox@3938 59 # lisp files
domcox@5578 60 LISP_DIR=" lisp lisp/calc lisp/calendar lisp/cedet lisp/cedet/ede lisp/cedet/semantic \
domcox@5578 61 lisp/cedet/semantic/analyze lisp/cedet/semantic/bovine lisp/cedet/semantic/decorate \
domcox@5578 62 lisp/cedet/semantic/symref lisp/cedet/semantic/wisent lisp/emacs-lisp lisp/emulation \
domcox@5578 63 lisp/erc lisp/eshell lisp/gnus lisp/international lisp/language lisp/mail lisp/mh-e \
domcox@5578 64 lisp/net lisp/nxml lisp/obsolete lisp/org lisp/play lisp/progmodes lisp/textmodes lisp/url"
domcox@3938 65 for dir in $LISP_DIR; do
domcox@3938 66 echo -n "Copying $dir files"
domcox@3938 67 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 68 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 69 if [ `ls $_pkg/usr/share/$PACKAGE/$VERSION/$dir/ | grep -c \.el$` -gt 0 ]; then
domcox@3938 70 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.el $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 71 fi
domcox@3938 72 for file in COPYING README TODO; do
domcox@3938 73 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@3938 74 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 75 fi
domcox@3938 76 done
domcox@3938 77 status
domcox@3938 78 done
domcox@3938 79 # Use linux term only
domcox@3938 80 LINUX_TERM="README linux.el rxvt.elc tty-colors.elc vt100.elc xterm.elc"
domcox@3938 81 echo -n "Copying lisp/term files (linux only)"
domcox@3938 82 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/lisp/term && \
domcox@3938 83 for file in $LINUX_TERM; do
domcox@3938 84 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/lisp/term/$file $fs/usr/share/$PACKAGE/$VERSION/lisp/term
domcox@3938 85 done
domcox@3938 86 status
domcox@3938 87 # leim files
domcox@3938 88 echo -n "Copying leim files"
domcox@3938 89 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/leim && \
domcox@3938 90 cp $_pkg/usr/share/$PACKAGE/$VERSION/leim/*.el $fs/usr/share/$PACKAGE/$VERSION/leim
domcox@3938 91 status
domcox@3938 92 LEIM_FILES="leim/ja-dic leim/quail"
domcox@3938 93 for dir in $LEIM_FILES; do
domcox@3938 94 echo -n "Copying $dir files"
domcox@3938 95 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 96 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/*.elc $fs/usr/share/$PACKAGE/$VERSION/$dir && \
domcox@3938 97 for file in COPYING README TODO; do
domcox@3938 98 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@3938 99 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 100 fi
domcox@3938 101 done
domcox@3938 102 status
domcox@3938 103 done
domcox@1046 104 # Conf files
domcox@3938 105 echo -n "Copying conf files"
domcox@5578 106 CONF_FILES="ETAGS.README charsets e edt-user.el emacs2.py emacs3.py emacs-buffer.gdb emacs.py \
domcox@5578 107 forms-d2.dat gnus nxml schema enriched.doc ms-kermit ps-prin0.ps ps-prin1.ps \
domcox@5578 108 ses-example.ses spook.lines yow.lines"
domcox@3938 109 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc && \
domcox@3938 110 for file in $CONF_FILES; do
domcox@3938 111 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@1046 112 done
domcox@3938 113 status
domcox@3938 114 # Pixmaps files
domcox@5578 115 XPM_DIR=" images images/custom images/ezimage images/gnus images/gud images/mail images/mpc \
domcox@5578 116 images/smilies images/smilies/grayscale images/smilies/medium images/tree-widget/default \
domcox@5578 117 images/tree-widget/folder"
domcox@3938 118 for dir in $XPM_DIR; do
domcox@3939 119 echo -n "Copying $dir xpm files"
domcox@3938 120 mkdir -p $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3938 121 cp $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.xpm $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3938 122 for file in COPYING README TODO; do
domcox@3938 123 if [ -e $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file ]; then
domcox@3938 124 cp $_pkg/usr/share/$PACKAGE/$VERSION/$dir/$file $fs/usr/share/$PACKAGE/$VERSION/$dir
domcox@3938 125 fi
domcox@3938 126 done
domcox@3938 127 status
domcox@3938 128 done
domcox@3939 129 PNG_DIR=" images images/gnus images/tree-widget/default images/tree-widget/folder"
domcox@3939 130 for dir in $PNG_DIR; do
domcox@3939 131 echo -n "Copying $dir png files"
domcox@3939 132 cp $_pkg/usr/share/$PACKAGE/$VERSION/etc/$dir/*.png $fs/usr/share/$PACKAGE/$VERSION/etc/$dir && \
domcox@3939 133 status
domcox@3939 134 done
domcox@3938 135 # Licence
domcox@3938 136 GNU_FILES="AUTHORS BABYL CENSORSHIP COPYING DISTRIB FTP GNU ORDERS SERVICE copying.paper"
domcox@3938 137 echo -n "Copying License files"
domcox@3938 138 for file in $GNU_FILES; do
domcox@3938 139 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/$file $fs/usr/share/$PACKAGE/$VERSION/etc
domcox@3938 140 done
domcox@3938 141 status
domcox@1046 142 # Install specific site file
domcox@3938 143 echo -n "Installing specific SliTaz file"
domcox@3938 144 mkdir -p $fs/usr/share/$PACKAGE/site-lisp/site-start.d && \
domcox@3938 145 cp -a $_pkg/usr/share/$PACKAGE/site-lisp $fs/usr/share/$PACKAGE && \
domcox@3939 146 cp -a stuff/default.el $fs/usr/share/$PACKAGE/site-lisp && \
domcox@3939 147 cp -a stuff/90-slitaz.el $fs/usr/share/$PACKAGE/site-lisp/site-start.d
domcox@3938 148 status
domcox@3938 149 # Install desktop files for emacs
domcox@3938 150 echo -n "Installing emacs menu"
domcox@3938 151 mkdir -p $fs/usr/share/pixmaps $fs/usr/share/applications && \
domcox@3938 152 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop $fs/usr/share/applications/ && \
domcox@3938 153 cp -a $_pkg/usr/share/icons/hicolor/32x32/apps/emacs.png $fs/usr/share/pixmaps
domcox@3938 154 status
domcox@3938 155 # Add a desktop file for emacs client
domcox@3938 156 echo -n "Installing emacsclient menu"
domcox@3938 157 cp -a $_pkg/usr/share/$PACKAGE/$VERSION/etc/emacs.desktop $fs/usr/share/applications/emacsclient.desktop && \
domcox@3938 158 sed -i 's/Exec.*/Exec=xterm -e emacsclient --alternate-editor="" %F/' $fs/usr/share/applications/emacsclient.desktop && \
domcox@3938 159 sed -i 's/Name=.*/Name=Emacsclient/' $fs/usr/share/applications/emacsclient.desktop
domcox@3938 160 status
domcox@1046 161 # Directory workaround
domcox@1046 162 cd $fs/usr/share/$PACKAGE/$VERSION
domcox@1046 163 ln -s ../site-lisp site-lisp
domcox@1046 164 }
domcox@1380 165
domcox@3939 166 post_install()
domcox@3939 167 {
domcox@3939 168 cd /usr/share/emacs/site-lisp
domcox@3939 169 cat <<-EOF >site-start.el
domcox@3939 170 ;; site-start.el for SliTaz -*- no-byte-compile: t -*-
domcox@3939 171 ;;
domcox@3939 172 ;; (C) GNU gpl v3 - SliTaz GNU/Linux 2009.
domcox@3939 173 ;;
domcox@3939 174 ;; This default site startup file for Emacs was created by tazpkg
domcox@3939 175 ;; reconfigure emacs. You may modify this file, replace it by your
domcox@3939 176 ;; own site initialisation, or even remove it completely.
domcox@3939 177 ;;
domcox@3939 178 EOF
domcox@3939 179 START_FILES=`ls site-start.d/ | sort`
domcox@3939 180 for file in $START_FILES; do
domcox@3939 181 cat site-start.d/$file >> site-start.el
domcox@3939 182 done
domcox@3939 183 }
domcox@3939 184
domcox@1380 185 post_remove()
domcox@1380 186 {
domcox@3938 187 rm -rf /usr/share/emacs
domcox@3938 188 rm -rf /usr/lib/emacs
domcox@1900 189 }