enable xwidgets
This commit is contained in:
parent
e320f0a731
commit
4da0853fbe
1 changed files with 43 additions and 44 deletions
|
@ -36,16 +36,14 @@ ARCH=${ARCH:-$(uname -m)}
|
|||
NUMJOBS=${NUMJOBS:-" -j3 "}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
X_TOOLKIT=${X_TOOLKIT:=gtk3}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
SLKCFLAGS="-O2"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
|
@ -62,12 +60,12 @@ rm -rf $PRGNAM-$VERSION
|
|||
|
||||
if [ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
|
||||
if [ ! -e $REPOSITORIES/$PRGNAM ] ; then
|
||||
git clone git://git.sv.gnu.org/emacs.git $REPOSITORIES/$PRGNAM
|
||||
git clone git://git.sv.gnu.org/emacs.git $REPOSITORIES/$PRGNAM
|
||||
else
|
||||
( cd $REPOSITORIES/$PRGNAM
|
||||
git pull
|
||||
[ -e Makefile ] && make distclean
|
||||
)
|
||||
( cd $REPOSITORIES/$PRGNAM
|
||||
git pull
|
||||
[ -e Makefile ] && make distclean
|
||||
)
|
||||
fi
|
||||
mkdir -p $TMP/$PRGNAM-$VERSION
|
||||
SRCDIR=$REPOSITORIES/$PRGNAM
|
||||
|
@ -79,13 +77,13 @@ fi
|
|||
cd $PRGNAM-$VERSION || exit 1
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
( cd $SRCDIR
|
||||
./autogen.sh
|
||||
./autogen.sh
|
||||
)
|
||||
|
||||
EMACS_VERSION=$(grep "AC_INIT(GNU Emacs," $SRCDIR/configure.ac | sed 's|AC_INIT(GNU Emacs, \([0-9.]*\), bug-gnu-emacs@gnu.org)|\1|')
|
||||
|
@ -101,7 +99,8 @@ $SRCDIR/configure \
|
|||
--mandir=/usr/man \
|
||||
--infodir=/usr/info \
|
||||
--with-x \
|
||||
--with-x-toolkit=$X_TOOLKIT \
|
||||
--with-x-toolkit=gtk3 \
|
||||
--with-xwidgets \
|
||||
--enable-link-time-optimization \
|
||||
--with-compress-install \
|
||||
--without-gconf \
|
||||
|
@ -113,14 +112,14 @@ make $NUMJOBS || make || exit 1
|
|||
make install DESTDIR=$PKG || exit 1
|
||||
|
||||
( cd $PKG/usr/bin
|
||||
rm emacs
|
||||
mv emacs-${EMACS_VERSION} emacs-${EMACS_VERSION}-with-x11
|
||||
cat <<EOF > $PKG/usr/bin/emacs
|
||||
rm emacs
|
||||
mv emacs-${EMACS_VERSION} emacs-${EMACS_VERSION}-with-x11
|
||||
cat <<EOF > $PKG/usr/bin/emacs
|
||||
#!/bin/sh
|
||||
|
||||
XMODIFIERS= GTK_IM_MODULE= QT_IM_MODULE= /usr/bin/emacs-${EMACS_VERSION}-with-x11 "\$@"
|
||||
EOF
|
||||
chmod +x $PKG/usr/bin/emacs
|
||||
chmod +x $PKG/usr/bin/emacs
|
||||
)
|
||||
|
||||
if [ ! "x$ONLY_X11" == "xYES" ] ; then
|
||||
|
@ -128,36 +127,36 @@ if [ ! "x$ONLY_X11" == "xYES" ] ; then
|
|||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
if [ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
|
||||
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
|
||||
mkdir -p $TMP/$PRGNAM-$VERSION
|
||||
SRCDIR=$REPOSITORIES/$PRGNAM/$BRANCH
|
||||
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
|
||||
mkdir -p $TMP/$PRGNAM-$VERSION
|
||||
SRCDIR=$REPOSITORIES/$PRGNAM/$BRANCH
|
||||
else
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
|
||||
SRCDIR=.
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
|
||||
SRCDIR=.
|
||||
fi
|
||||
|
||||
cd $PRGNAM-$VERSION || exit 1
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
$SRCDIR/configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--program-prefix="" \
|
||||
--program-suffix="" \
|
||||
--mandir=/usr/man \
|
||||
--infodir=/usr/info \
|
||||
--with-x=no \
|
||||
--without-gconf \
|
||||
--with-compress-install \
|
||||
--build=${ARCH}-slackware-linux
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
$SRCDIR/configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--program-prefix="" \
|
||||
--program-suffix="" \
|
||||
--mandir=/usr/man \
|
||||
--infodir=/usr/info \
|
||||
--with-x=no \
|
||||
--without-gconf \
|
||||
--with-compress-install \
|
||||
--build=${ARCH}-slackware-linux
|
||||
|
||||
make $NUMJOBS || make || exit 1
|
||||
|
||||
|
@ -176,7 +175,7 @@ mv $PKG/usr/bin/ctags $PKG/usr/bin/ctags-emacs
|
|||
mv $PKG/usr/man/man1/ctags.1 $PKG/usr/man/man1/ctags-emacs.1
|
||||
|
||||
find $PKG | xargs file | grep -e "executable" -e "shared object" \
|
||||
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
|
||||
rm $PKG/usr/info/dir*
|
||||
|
||||
|
|
Loading…
Reference in a new issue