How to compile urxvt? (and make it small!)

discuss compiling applications for Puppy
Message
Author
User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

How to compile urxvt? (and make it small!)

#1 Post by sc0ttman »

How does Barry compile urxvt? My builds work, but are way too big!!

I have tried compiling different versions, from 9.05 to the latest, with various options enabled and disabled..

I have tried compiling it with most things disabled.. But I still have the same problem...
Barrys urxvt binary ends up about 265kb, mine is always over 1mb!!

So, how does barry get urxvt so small, when compiling it?
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

Re: How to compile urxvt

#2 Post by sc0ttman »

Just so you know, I want to compile it to add 256 colour support..

I would update the 1st post to have this information, but we STILL can't edit our posts in this sub section!! :(
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#3 Post by amigo »

With barry's build system, you'd have to search through his blog or download the complete sources (or maybe in woof somewhere) to find out what compile-time options he used. The again, he may have used a pet put together by some contributor -even years ago so we don't even know what the options were.

--enable-256-color is the option you need to use. On my KISS system, the xterm binary is 308K without doing any really extreme optimization. You are probably looking at the raw *unstripped* size. Simply stripping it may knock off most of the difference you see. BK's may also be compressed with upx. for some programs, stripping alone will take off 75%! of the raw size.

It took me about 5 seconds to find the full CLFAGS, LDLFAGS and configure options I used on KISS. But it's on another machine so not really convenient to paste the options here.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#4 Post by sc0ttman »

Thanks for the info... I should have stated, that Barrys 265kb binary is not upx'd, mine was twice as big, even when upx'd (600kb) ... I ran 'strip' on both binaries before comparing... Strip did not make much difference, about 40% if I remember correctly...

Oh well, I knew it would be hard to find the configure line he used... Or who else if it wasn't Barry... :roll:

Would still love a really light, 256 colour, UTF-8 enabled terminal...
(I like elinks..)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#5 Post by Dingo »

try applying:

Code: Select all

CFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -mpreferred-stack-boundary=2 -march=i486 -mtune=i686 "
and stripping then

Code: Select all

strip --strip-unneeded
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#6 Post by sc0ttman »

Dingo wrote:try applying:

Code: Select all

CFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -mpreferred-stack-boundary=2 -march=i486 -mtune=i686 "
and stripping then

Code: Select all

strip --strip-unneeded
Thanks for the info Dingo, I have done this, and still got 1012kb binary, after stripping.. 1012k seems to be the size, most of the time! I am gonna check the options available in the urxvt binary that I'm 'competing' with, and will retry .. I have disabled in-built PERL (--disable-perl) as well, I think that's right to do that..

Maybe I will try compiling it in another pup see how that goes..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#7 Post by sc0ttman »

Hmm.. the strip command seems to be having a much greater effect than before, with a few different options.. I now get a nice small binary :).. And the --with-codesets="" seems to make a big difference..

I am really only looking to upgrade a few features to make elinks work nicer.. I basically want a UTF-8 enabled terminal (showing cyrillic, etc, without problems) that can ALSO show the 'VTE' or 'Linux, OS/2' frames in elinks..

At the moment, I've got UTF-8 and 256 colours, but cannot get urxvt to show any frames in elinks correctly, this is my last stumbling block.. Does anyone know what settings or options are resonsible for this? I am keen to get it done, because using 256 colours is nice, and doesn't seem to affect the size or speed much at all..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#8 Post by sc0ttman »

I should note that Barrys urxvt shows the frames OK, but no 256 colours..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#9 Post by sc0ttman »

Here's the config line I used: (and others similar)...:

./configure CFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -mpreferred-stack-boundary=2 -march=i486 -mtune=i686 " --prefix=/usr --sysconfdir=/etc --localstatedir=/var --build=i486-pc-linux-gnu --with-term=urxvt --enable-256-color --disable-unicode3 --enable-xft --enable-font-styles --disable-afterimage --disable-pixbuf --disable-transparency --disable-fading --disable-rxvt-scroll --disable-next-scroll --disable-xterm-scroll --disable-perl --disable-xim --enable-backspace-key --enable-delete-key --disable-resources --disable-swapscreen --disable-iso14755 --disable-frills --enable-keepscrolling --enable-selectionscrolling --enable-mousewheel --disable-slipwheeling --disable-smart-resize --disable-text-blink --disable-pointer-blank --disable-utmp --disable-wtmp --disable-lastlog --with-codesets="" --disable-combining --disable-assert
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#10 Post by big_bass »

if you used slackware or the sbopkg tool
I posted in cutting edge section this package builds correctly automatically with these options

*the package wont build without pkgtool that is pre installed in txz_pup
its the heart of making packages from slackbuild scripts

Code: Select all

#!/bin/sh

# Slackware build script for rxvt-unicode

# Written by Dugan Chen (dugan_c@fastmail.fm)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Maintained by Daniel LEVAI <leva@ecentrum.hu>, 2010, 2011

PRGNAM=rxvt-unicode
VERSION="9.12"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

DOCS="COPYING Changes INSTALL README.FAQ README.configure"

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Option to enable/disable the embedded perl interpreter
CONFIG_PERL=${CONFIG_PERL:-YES}

if [ "${CONFIG_PERL}" == 'YES' ];then
	_PERL_OPT='--enable-perl'
else
	_PERL_OPT='--disable-perl'
fi

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --enable-everything \
  --enable-unicode3 \
  --enable-combining \
  --enable-xft \
  --enable-font-styles \
  --enable-transparency \
  --enable-fading \
  --enable-frills \
  --disable-afterimage \
  --enable-pixbuf \
  --enable-rxvt-scroll \
  --enable-next-scroll \
  --enable-xterm-scroll \
  ${_PERL_OPT} \
  --enable-xim \
  --enable-iso14755 \
  --enable-keepscrolling \
  --enable-selectionscrolling \
  --enable-mousewheel \
  --enable-slipwheeling \
  --enable-smart-resize \
  --enable-text-blink \
  --enable-pointer-blank \
  --enable-utmp \
  --enable-wtmp \
  --enable-lastlog \
  --build=$ARCH-slackware-linux

make
mkdir -p $PKG/usr/share/terminfo
TERMINFO=$PKG/usr/share/terminfo make install DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object"  | grep ELF | \
  cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#11 Post by big_bass »

big_bass wrote:if you used slackware or the sbopkg tool
I posted in cutting edge section this package builds correctly automatically with these options (it isnt small but you get the idea what you can use for options and then remove what you want ) and maintain a script to rebuild the package lite and share

*the package wont build without pkgtool that is pre installed in txz_pup
its the heart of making packages from slackbuild scripts

Code: Select all

#!/bin/sh

# Slackware build script for rxvt-unicode

# Written by Dugan Chen (dugan_c@fastmail.fm)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Maintained by Daniel LEVAI <leva@ecentrum.hu>, 2010, 2011

PRGNAM=rxvt-unicode
VERSION="9.12"
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

DOCS="COPYING Changes INSTALL README.FAQ README.configure"

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Option to enable/disable the embedded perl interpreter
CONFIG_PERL=${CONFIG_PERL:-YES}

if [ "${CONFIG_PERL}" == 'YES' ];then
	_PERL_OPT='--enable-perl'
else
	_PERL_OPT='--disable-perl'
fi

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --enable-everything \
  --enable-unicode3 \
  --enable-combining \
  --enable-xft \
  --enable-font-styles \
  --enable-transparency \
  --enable-fading \
  --enable-frills \
  --disable-afterimage \
  --enable-pixbuf \
  --enable-rxvt-scroll \
  --enable-next-scroll \
  --enable-xterm-scroll \
  ${_PERL_OPT} \
  --enable-xim \
  --enable-iso14755 \
  --enable-keepscrolling \
  --enable-selectionscrolling \
  --enable-mousewheel \
  --enable-slipwheeling \
  --enable-smart-resize \
  --enable-text-blink \
  --enable-pointer-blank \
  --enable-utmp \
  --enable-wtmp \
  --enable-lastlog \
  --build=$ARCH-slackware-linux

make
mkdir -p $PKG/usr/share/terminfo
TERMINFO=$PKG/usr/share/terminfo make install DESTDIR=$PKG

find $PKG | xargs file | grep -e "executable" -e "shared object"  | grep ELF | \
  cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#12 Post by technosaurus »

you can set the CFLAGS to whatever you want - it just ignores them ... you have to edit the makefiles after running configure

this type of "forced optimal setting" is quite irritating and why individuals like myself and entire distros write wrappers around gcc
... to filter out the crud
... then you end up with issues with the wrappers
... rinse and repeat

even with decent options and settings grokked in, urxvt is still a giant pile of C++ bloat compared to its C cousins (rxvt and the unicode compliant mrxvt)

the best way to make urxvt small is by compiling mrxvt and making a symlink

here is what mrxvt has:
1. Multi-tab support
2. Run time changeable per-tab titles / backgrounds / colors.
3. Session support for each tab
4. Input broadcasting to all tabs
5. Customizable keyboard shortcuts
6. Translucency and pseudo transparency support
7. JPEG / PNG / XPM background support
8. Off-focus background fading
9. Xft support.
10. Text shadow
11. Menubar / popup menus
12. XIM and multi-language (Chinese/Japanese/Korean) support.
13. Five different scroll bar styles
14. Small and fast.
15. Does not depend on GTK / Qt / Gnome / KDE.
16. Available on multiple platforms.
17. utmp/wtmp/lastlog logging

Image
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#13 Post by amigo »

+1 mrxvt

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#14 Post by sc0ttman »

amigo wrote:+1 mrxvt
I will definitely have another look at mrxvt, which I had installed a while back, liked it but it was UGLY... and I have yet to find a package which can show *any* Cyrillic whatsoever .. But I'll get the source and give it a go myself... See what I can make...

Techno, I noticed that the CFLAGS make no difference at all to my builds -
... so are they actually ignored?
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#15 Post by technosaurus »

sc0ttman wrote:
amigo wrote:+1 mrxvt
I will definitely have another look at mrxvt, which I had installed a while back, liked it but it was UGLY... and I have yet to find a package which can show *any* Cyrillic whatsoever .. But I'll get the source and give it a go myself... See what I can make...
mrxvt is themeable and _can_ look quite nice
Techno, I noticed that the CFLAGS make no difference at all to my builds -
... so are they actually ignored?
Yeah some projects (a growing number actually) like to impose their own default flags that override the ones in env. The only sure way to impose your own will, is to grok them out of the makefile (by hand or with a sed script) or to make a wrapper for gcc (it is hard to find every occurence with sed ... packages sometimes even extract flags from your perl or python compilation)

here is a stub for a gcc wrapper

Code: Select all

#!/bin/sh
for arg  in $@ ; do
	case $arg in
		-O0|-O1|-O2|-O3)newargs=${newargs}" "-Os;;
		*)newargs=${newargs}" "${arg};;
	esac
done

case $newargs in
	" -l"*)newargs=${newargs}" "$yourldflags;;
esac

i486-t2-linux-gnu-gcc $yourcflags $newargs
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Iguleder
Posts: 2026
Joined: Tue 11 Aug 2009, 09:36
Location: Israel, somewhere in the beautiful desert
Contact:

#16 Post by Iguleder »

Here's my build script, produces a ~95 KB package. 8)

Code: Select all

#!/bin/sh

PKG_NAME="rxvt-unicode"
PKG_VER="9.12"
PKG_REV="1"
PKG_DESC="Terminal emulator"
PKG_CAT="Utility"
PKG_DEPS=""

download() {
	# download the sources
	wget http://dist.schmorp.de/rxvt-unicode/$PKG_NAME-$PKG_VER.tar.bz2
	[ $? -ne 0 ] && return 1
	return 0
}

build() {
	# extract the sources
	tar -xjvf $PKG_NAME-$PKG_VER.tar.bz2
	[ $? -ne 0 ] && return 1

	cd $PKG_NAME-$PKG_VER   

   	# configure the package
	CXXFLAGS="$CXXFLAGS" ./configure \
	                               $BASE_CONFIGURE_ARGS \
	                               --prefix=/usr \
	                               --with-terminfo=/usr/share/terminfo \
	                               --disable-256-color \
	                               --disable-unicode3 \
	                               --disable-xft \
	                               --disable-font-styles \
	                               --disable-afterimage \
	                               --disable-pixbuf \
	                               --disable-transparency \
	                               --disable-fading \
	                               --disable-rxvt-scroll \
	                               --enable-next-scroll \
	                               --disable-xterm-scroll \
	                               --disable-perl \
	                               --disable-xim \
	                               --enable-backspace-key \
	                               --enable-delete-key \
	                               --disable-resources \
	                               --disable-swapscreen \
	                               --disable-iso14755 \
	                               --disable-frills \
	                               --enable-keepscrolling \
	                               --enable-selectionscrolling \
	                               --enable-mousewheel \
	                               --disable-slipwheeling \
	                               --disable-smart-resize \
	                               --disable-text-blink \
	                               --disable-pointer-blank \
	                               --disable-utmp \
   	                               --disable-wtmp \
   	                               --disable-lastlog \
   	                               --with-codesets="" \
   	                               --disable-combining \
   	                               --disable-assert \
   	                                                       
	[ $? -ne 0 ] && return 1
      
	# build the package
	make -j $BUILD_THREADS
	[ $? -ne 0 ] && return 1

	return 0
}

package() {	
	# install the package
	make DESTDIR=$INSTALL_DIR install
	[ $? -ne 0 ] && return 1

	# create a symlink for compatibility with existing stuff that rely on rxvt
	ln -s urxvt $INSTALL_DIR/usr/bin/rxvt

	# remove urxvtc and urxvtd
	rm -f $INSTALL_DIR/usr/bin/urxvtc $INSTALL_DIR/usr/bin/urxvtd
		
	# create a menu entry
	mkdir -p $INSTALL_DIR/usr/share/applications
	echo '[Desktop Entry]
Encoding=UTF-8
Name=Rxvt-unicode terminal emulator
Icon=mini-term.xpm
Comment=Rxvt-unicode terminal emulator
Exec=urxvt
Terminal=false
Type=Application
Categories=Utility;TerminalEmulator;
GenericName=Rxvt-unicode terminal emulator' > $INSTALL_DIR/usr/share/applications/rxvt-unicode.desktop
	chmod 644 $INSTALL_DIR/usr/share/applications/rxvt-unicode.desktop

	return 0
}
[url=http://dimakrasner.com/]My homepage[/url]
[url=https://github.com/dimkr]My GitHub profile[/url]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#17 Post by sc0ttman »

Thanks Igu, I alrady checked that one out, remembered it was in your build script thingy...

Does anyone have the following problem with urxvt?

When I use 'urxvt -e command' the terminal window pens for a second then exits...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#18 Post by sc0ttman »

sc0ttman wrote:Thanks Igu, I alrady checked that one out, remembered it was in your build script thingy...

Does anyone have the following problem with urxvt?

When I use 'urxvt -e command' the terminal window opens for a second then exits...
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

Ibidem
Posts: 549
Joined: Wed 26 May 2010, 03:31
Location: State of Jefferson

Necromancy ftw!

#19 Post by Ibidem »

I know the thread is old, but an answer late can still help someone...

urxvt -e command
will exit as soon as the command does unless you use -hold as well.

CFLAGS won't work, it uses CXXFLAGS (as do most C++ programs).
For configure, you must specify them before running configure.
so CXXFLAGS=... ./configure

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#20 Post by musher0 »

Hi, people.

mrxvt's tab-capacity is indeed interesting, but since it doesn't support utf-8 localizations, and on purpose, too -- so any accented character used in it will be deformed to gibberish.

Unless somebody knows a good workaround, after all the trouble the new localization packages gave us, it would be counter-productive to use mrxvt AND a utf-8 localization in Puppy.

Conversely, urxvt can be made tab-abled, through the perl patch, but problem is: how to set the urxvt perl patch in Puppy.

Or we can dump those two and the headaches they create, and use ROX terminal instead (which supports tabs AND utf-8).

That said, I still like the flexibility in shading that urxvt offers, especially if you add the title/border control in icewm's winoptions. You can sort of color-code urxvt for various tasks.

Just my 2 cents.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply