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 "}
|
NUMJOBS=${NUMJOBS:-" -j3 "}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
|
|
||||||
X_TOOLKIT=${X_TOOLKIT:=gtk3}
|
|
||||||
|
|
||||||
if [ "$ARCH" = "i486" ]; then
|
if [ "$ARCH" = "i486" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||||
elif [ "$ARCH" = "i686" ]; then
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||||
elif [ "$ARCH" = "s390" ]; then
|
elif [ "$ARCH" = "s390" ]; then
|
||||||
SLKCFLAGS="-O2"
|
SLKCFLAGS="-O2"
|
||||||
elif [ "$ARCH" = "x86_64" ]; then
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
SLKCFLAGS="-O2 -fPIC"
|
SLKCFLAGS="-O2 -fPIC"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
|
@ -62,12 +60,12 @@ rm -rf $PRGNAM-$VERSION
|
||||||
|
|
||||||
if [ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
|
if [ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
|
||||||
if [ ! -e $REPOSITORIES/$PRGNAM ] ; 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
|
else
|
||||||
( cd $REPOSITORIES/$PRGNAM
|
( cd $REPOSITORIES/$PRGNAM
|
||||||
git pull
|
git pull
|
||||||
[ -e Makefile ] && make distclean
|
[ -e Makefile ] && make distclean
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
mkdir -p $TMP/$PRGNAM-$VERSION
|
mkdir -p $TMP/$PRGNAM-$VERSION
|
||||||
SRCDIR=$REPOSITORIES/$PRGNAM
|
SRCDIR=$REPOSITORIES/$PRGNAM
|
||||||
|
@ -79,13 +77,13 @@ fi
|
||||||
cd $PRGNAM-$VERSION || exit 1
|
cd $PRGNAM-$VERSION || exit 1
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find . \
|
find . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||||
-exec chmod 755 {} \; -o \
|
-exec chmod 755 {} \; -o \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
-exec chmod 644 {} \;
|
-exec chmod 644 {} \;
|
||||||
|
|
||||||
( cd $SRCDIR
|
( 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|')
|
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 \
|
--mandir=/usr/man \
|
||||||
--infodir=/usr/info \
|
--infodir=/usr/info \
|
||||||
--with-x \
|
--with-x \
|
||||||
--with-x-toolkit=$X_TOOLKIT \
|
--with-x-toolkit=gtk3 \
|
||||||
|
--with-xwidgets \
|
||||||
--enable-link-time-optimization \
|
--enable-link-time-optimization \
|
||||||
--with-compress-install \
|
--with-compress-install \
|
||||||
--without-gconf \
|
--without-gconf \
|
||||||
|
@ -113,14 +112,14 @@ make $NUMJOBS || make || exit 1
|
||||||
make install DESTDIR=$PKG || exit 1
|
make install DESTDIR=$PKG || exit 1
|
||||||
|
|
||||||
( cd $PKG/usr/bin
|
( cd $PKG/usr/bin
|
||||||
rm emacs
|
rm emacs
|
||||||
mv emacs-${EMACS_VERSION} emacs-${EMACS_VERSION}-with-x11
|
mv emacs-${EMACS_VERSION} emacs-${EMACS_VERSION}-with-x11
|
||||||
cat <<EOF > $PKG/usr/bin/emacs
|
cat <<EOF > $PKG/usr/bin/emacs
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
XMODIFIERS= GTK_IM_MODULE= QT_IM_MODULE= /usr/bin/emacs-${EMACS_VERSION}-with-x11 "\$@"
|
XMODIFIERS= GTK_IM_MODULE= QT_IM_MODULE= /usr/bin/emacs-${EMACS_VERSION}-with-x11 "\$@"
|
||||||
EOF
|
EOF
|
||||||
chmod +x $PKG/usr/bin/emacs
|
chmod +x $PKG/usr/bin/emacs
|
||||||
)
|
)
|
||||||
|
|
||||||
if [ ! "x$ONLY_X11" == "xYES" ] ; then
|
if [ ! "x$ONLY_X11" == "xYES" ] ; then
|
||||||
|
@ -128,36 +127,36 @@ if [ ! "x$ONLY_X11" == "xYES" ] ; then
|
||||||
cd $TMP
|
cd $TMP
|
||||||
rm -rf $PRGNAM-$VERSION
|
rm -rf $PRGNAM-$VERSION
|
||||||
if [ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
|
if [ ! -e $CWD/$PRGNAM-$VERSION.tar.?z* ] ; then
|
||||||
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
|
[ -e $TMP/$PRGNAM-$VERSION ] && rm -fr $TMP/$PRGNAM-$VERSION
|
||||||
mkdir -p $TMP/$PRGNAM-$VERSION
|
mkdir -p $TMP/$PRGNAM-$VERSION
|
||||||
SRCDIR=$REPOSITORIES/$PRGNAM/$BRANCH
|
SRCDIR=$REPOSITORIES/$PRGNAM/$BRANCH
|
||||||
else
|
else
|
||||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1
|
||||||
SRCDIR=.
|
SRCDIR=.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $PRGNAM-$VERSION || exit 1
|
cd $PRGNAM-$VERSION || exit 1
|
||||||
chown -R root:root .
|
chown -R root:root .
|
||||||
find . \
|
find . \
|
||||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||||
-exec chmod 755 {} \; -o \
|
-exec chmod 755 {} \; -o \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||||
-exec chmod 644 {} \;
|
-exec chmod 644 {} \;
|
||||||
|
|
||||||
CFLAGS="$SLKCFLAGS" \
|
CFLAGS="$SLKCFLAGS" \
|
||||||
CXXFLAGS="$SLKCFLAGS" \
|
CXXFLAGS="$SLKCFLAGS" \
|
||||||
$SRCDIR/configure \
|
$SRCDIR/configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--program-prefix="" \
|
--program-prefix="" \
|
||||||
--program-suffix="" \
|
--program-suffix="" \
|
||||||
--mandir=/usr/man \
|
--mandir=/usr/man \
|
||||||
--infodir=/usr/info \
|
--infodir=/usr/info \
|
||||||
--with-x=no \
|
--with-x=no \
|
||||||
--without-gconf \
|
--without-gconf \
|
||||||
--with-compress-install \
|
--with-compress-install \
|
||||||
--build=${ARCH}-slackware-linux
|
--build=${ARCH}-slackware-linux
|
||||||
|
|
||||||
make $NUMJOBS || make || exit 1
|
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
|
mv $PKG/usr/man/man1/ctags.1 $PKG/usr/man/man1/ctags-emacs.1
|
||||||
|
|
||||||
find $PKG | xargs file | grep -e "executable" -e "shared object" \
|
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*
|
rm $PKG/usr/info/dir*
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue