SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It's not really "old". There's only 3 months diff between 1.4.14 and 1.6.4.... As with any new major version of anything, Slackware doesn't immediately upgrade.
I may be the dumbest Slackware user on the planet: I can't uncompress the slackbuild files in the first post.
"tar -xvf xulrunner.tar.bz2" doesn't seem to be working.
Could somebody help me?
EDIT: ARK (in KDE) gives this error: "bunzip2 (stdin) is not a bzip2 file."
I tried downloading the SlackBuild files to test but it appears that they are no longer there. You'd have to see if dugan can repost them -- it seems they have been deleted or moved.
I tried downloading the SlackBuild files to test but it appears that they are no longer there. You'd have to see if dugan can repost them -- it seems they have been deleted or moved.
It is likely that the files you have are corrupt.
Ah. Thank you.
Dugan, If you're reading this, would you please check your downloads directory?
The -j option for tar.bz2 archives (or the -z option for tar.gz archives) is no longer needed -- a `tar -xvf filename.tar.bz2` should work just fine (I believe it tries to figure out what kind of archive it is anyway). However, as I said previously, the downloads were likely corrupt.
I've deleted them. I'm sorry I didn't mention that.
What I have there now is a standalone Firefox SlackBuild which builds XULRunner into Firefox. I announced that SlackBuild (but not the deletion of the old ones) in my last post of the Beautiful Fonts thread.
My reasoning was that Slackware already includes a set of Mozilla libraries to link against (they're part of Seamonkey), and apps linked against them generally work with Firefox 3.
Nevertheless, I'll repost them in the next few days. I'll check a couple of places where I might have them archived, and if I can't find them I'll just rewrite them.
Not today though. Today all my free time will be spent finishing Gears of War 2.
I've deleted them. I'm sorry I didn't mention that.
What I have there now is a standalone Firefox SlackBuild which builds XULRunner into Firefox. I announced that SlackBuild (but not the deletion of the old ones) in my last post of the Beautiful Fonts thread.
My reasoning was that Slackware already includes a set of Mozilla libraries to link against (they're part of Seamonkey), and apps linked against them generally work with Firefox 3.
So is that your recommended method for building Firefox 3 now? If so, is there any reason to build XULrunner?
Quote:
Nevertheless, I'll repost them in the next few days. I'll check a couple of places where I might have them archived, and if I can't find them I'll just rewrite them.
Not today though. Today all my free time will be spent finishing Gears of War 2.
It's good that your priorities are in order.
Seriously, though, I still had trouble with the bzip2 archive for the Firefox slackbuild at your site. Is there any chance you could use gzip?
I haven't tried the long, more aggressive optimization there, however I tested my builds using SunSpider. One was 4550 ms, (but I changed some flags I didn't like) and the last one was 4672.
Ethan said that his best results were 4207 ms, and that after applying that long line of aggressive optimizations it was 8400 ms; which is why I did not apply them.
I merged most options of Dugan's and Jong's SlackBuilds, with some other options I added here and there, and made a mutant SlackBuild that can build either 1)a stand-alone Firefox, 2)a dynamic Firefox that links against xulrunner, or 3)xulrunner. You just change a flag and it builds any of them. (APPNAM)
I like Firefox being Firefox, so I activate official branding -redistributing these whitout permission can be illegal. I use march=prescott. Most of the patches -all excepting my domestic patches- and files required by this SlackBuild are the ones provided by Slackware.
Code:
#!/bin/sh
# Special SlackBuild
# Set initial variables:
NAME=firefox # Program name
PNAME=mozilla-firefox # Package name (Useful for changing case, removing "-"s, etc.)
APPNAM=ff_big # ff_big=Firefox with Xulrunner, ff_small=Firefox to link against Xulrunner, xul=Xulrunner
VERSION=3.0.8 # Program version
XULVERSION=1.9.0.8 # Xulrunner version
PVERSION=$VERSION # Package version (Useful for removing "-"s, CVS builds, etc.)
ARCH=${ARCH:-prescott} # Package architecture
PARCH=$ARCH # Package architecture abbreviation. (Useful for removing "-"s)
BUILD=${BUILD:-1ds} # Build number plus packager initials (use your own)
TARGET=${TARGET:-i486} # Build target (i486 or i686, this depends on your compiler)
CWD=$(pwd)
TMP=${TMP:-/tmp/$PNAME-build} # Location to compile the source
PKG=$TMP/package-$NAME # Location to build the package (use "package-$NAME" to avoid poss. conflicts)
# Define compiler flags based on intended architecture:
# Can easily expand this for alternate compilations
if [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O3 -march=i686 -mtune=i686"
elif [ "$ARCH" = "pentium4" ]; then
SLKCFLAGS="-O3 -march=pentium4 -mtune=pentium4"
elif [ "$ARCH" = "prescott" ]; then
SLKCFLAGS="-O3 -march=prescott -mtune=prescott"
# HEAVY OPTIMIZATIONS
# SLKCFLAGS="-O3 -march=prescott -mtune=prescott -pipe -mfpmath=sse,387 -fforce-addr -mieee-fp -msse3 -msse2 -msse -mmmx -ftree-loop-linear -fivopts -malign-natural -fsched-interblock -fstrict-aliasing"
elif [ "$ARCH" = "athlon-4" ]; then
SLKCFLAGS="-O2 -march=athlon-4 -mtune=athlon-4"
fi
rm -rf $PKG # Get rid of any leftovers
mkdir -p $PKG # Make sure $PKG and $TMP (-p switch) exist
cd $TMP
rm -rf mozilla
# Should consider changing to check for tar.gz or tar.bz2
#tar xzvf $CWD/$NAME-$VERSION.tar.gz || exit 1
tar xvjf $CWD/$NAME-$VERSION-source.tar.bz2 || exit 1
cd mozilla
# Correct general permissions/ownership:
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 {} \;
# Define what we are building
if [ $APPNAM = "ff_big" -o $APPNAM = "ff_small" ]; then APP=browser BRANDI="--enable-official-branding"; fi
if [ $APPNAM = "ff_big" ]; then CPTHREADS="--with-pthreads"; fi
if [ $APPNAM = "ff_small" ]; then CPNS="--with-system-nspr --with-system-nss" CPXUL="--with-libxul-sdk=/usr/lib/xulrunner-devel-$XULVERSION"; fi
if [ $APPNAM = "xul" ]; then APP=xulrunner CPTHREADS="--with-pthreads"; fi
# Classic "./configure && make && make install":
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--enable-application="$APP" \
$BRANDI \
$CPXUL \
$CPNS \
$CPTHREADS \
--enable-libxul \
--enable-optimize="$SLKCFLAGS" \
--enable-default-toolkit=cairo-gtk2 \
--disable-gnomevfs \
--disable-gnomeui \
--disable-dbus \
--enable-system-cairo \
--enable-system-lcms \
--enable-system-sqlite \
--enable-pango \
--enable-svg \
--enable-canvas \
--with-system-jpeg \
--with-system-zlib \
--with-system-bz2 \
--enable-install-strip \
--enable-strip \
--disable-static \
--disable-debug \
--disable-tests \
--disable-mochitest \
--disable-pedantic \
--disable-xpcom-obsolete \
--disable-accessibility \
--disable-crashreporter \
--disable-javaxpcom \
--disable-xprint \
--disable-installer \
--enable-update-channel=release \
--disable-updater
make #-j2
make install DESTDIR=$PKG
if [ $APPNAM = "ff_big" -o $APPNAM = "ff_small" ]; then # We are building Firefox
# Patch Firefox, Slackware style
( cd $PKG/usr/lib/firefox-$VERSION
zcat $CWD/scripts/mozilla-firefox-mimeTypes-fix.diff.gz | patch -p1 --verbose --suffix=.orig || exit 1
zcat $CWD/scripts/firefox.moz_plugin_path.diff.gz | patch -p1 --verbose --suffix=.orig || exit 1
rm -f defaults/pref/firefox.js.orig
# I put my patches here ;) there are many more at home
# zcat $CWD/scripts/rss.diff.gz | patch -p1 --verbose --suffix=.orig || exit 1
)
if [ ! $? = 0 ]; then
exit 1
fi
mkdir -p $PKG/{install,usr/bin,usr/lib/mozilla/plugins}
mkdir -p $PKG/usr/share/{applications,pixmaps}
( cd $PKG/usr/bin
ln -sf /usr/lib/firefox-$VERSION/firefox .
)
cat $CWD/mozilla-firefox.desktop > $PKG/usr/share/applications/mozilla-firefox.desktop
cat $CWD/firefox.png > $PKG/usr/share/pixmaps/firefox.png
cat $CWD/slack-desc > $PKG/install/slack-desc
# These files/directories are usually created if Firefox is run as root, which on many
# systems might (and possibly should) be never. Therefore, if we don't see them we'll
# put stubs in place to prevent startup errors.
( cd $PKG/usr/lib/firefox-$VERSION
if [ -d extensions/talkback\@mozilla.org ]; then
if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
echo > extensions/talkback\@mozilla.org/chrome.manifest
fi
fi
if [ ! -d updates ]; then
mkdir -p updates/0
fi
)
fi
if [ $APPNAM = "ff_big" ]; then # firefox-devel, only when building the big Firefox...
PKGD=$TMP/package-firefox-devel
# Some cleanup - haven't tested if it breaks something
#rm -rf $PKG/usr/include/$NAME-$VERSION/unstable
#rm -rf $PKG/usr/share/idl/$NAME-$VERSION/unstable
# If we want the firefox-devel package...
mkdir -p $PKGD/{install,usr/lib,usr/share}
mv $PKG/usr/include $PKGD/usr
mv $PKG/usr/lib/$NAME-devel-$VERSION $PKGD/usr/lib
mv $PKG/usr/share/idl $PKGD/usr/share
( cd $PKGD/usr/lib/$NAME-devel-$VERSION/sdk/lib
for lib in *.so ; do ln -sf ../../../$NAME-$VERSION/$lib $lib; done )
# ( cd $PKGD/usr/lib
# ln -sf $NAME-devel-$VERSION $NAME-devel
# cd ../include
# ln -sf $NAME-$VERSION $NAME )
cp -a $CWD/slack-desc.ffdev $PKGD/install/slack-desc
# If we don't want these package being built, just nuke it
#rm -rf $PKGD
# Instead, make the package
cd $PKGD
makepkg -l y -c n $TMP/$NAME-devel-$PVERSION-$PARCH-$BUILD.tgz
fi
if [ $APPNAM = "xul" ]; then # We are building Xulrunner
XUL=xulrunner
( cd $PKG/usr/lib
ln -sf $XUL-$XULVERSION $XUL
cd ../include
ln -sf $XUL-$XULVERSION $XUL )
# Some cleanup
#rm -rf $PKG/usr/include/$NAME-$VERSION/unstable
#rm -rf $PKG/usr/share/idl/$NAME-$VERSION/unstable
# Perms
find $PKG/usr/include -type f -name "*.h" | xargs chmod 644
find $PKG/usr/share/idl -type f -name "*.idl" | xargs chmod 644
# Library path
mkdir -p $PKG/etc/profile.d
install -m 755 $CWD/scripts/$XUL.sh $PKG/etc/profile.d
# Shouldn't be a problem doing this...
# I don't see a point in having duplicate libs on the system.
( cd $PKG/usr/lib/$XUL-devel-$XULVERSION/sdk/lib
for lib in *.so ; do ln -sf ../../../$XUL-$VERSION/$lib $lib; done )
cp -a $CWD/slack-desc.xulrunner $PKG/install/slack-desc
fi
# Add required dependencies info:
if [ -e $CWD/slack-required ]; then
mkdir -p $PKG/install
cat $CWD/slack-required > $PKG/install/slack-required
fi
# Add install script:
if [ -e $CWD/doinst.sh ]; then
cat $CWD/doinst.sh > $PKG/install/doinst.sh
fi
# Build the package:
cd $PKG
makepkg -l y -c n $TMP/$PNAME-$PVERSION-$PARCH-$BUILD.tgz
# Clean up the extra stuff:
if [ "$1" = "--cleanup" ]; then
rm -rf $PKG
fi
It also builds a firefox-devel package, split from the big package tree. Haven't tested xulrunner and the small package yet.
Last edited by folkenfanel; 04-05-2009 at 05:53 PM.
Reason: adding info about an extra package built by this script
|-----handy-ruler------------------------------------------------------|
firefox-devel: firefox-devel (Firefox development files)
firefox-devel:
firefox-devel: This package provides the Firefox development files
firefox-devel: to build Gecko apps. You actualy need Firefox as it links
firefox-devel: against the Firefox libraries.
firefox-devel:
firefox-devel: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/
firefox-devel:
firefox-devel:
firefox-devel:
slack-desc.xulrunner
Code:
|-----handy-ruler------------------------------------------------------|
xulrunner: xulrunner (XUL Runtime environment)
xulrunner:
xulrunner: XULRunner provides the XUL Runtime environment for Gecko
xulrunner: applications as well as the development files for
xulrunner: linking against.
xulrunner:
xulrunner: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/
xulrunner:
xulrunner:
xulrunner:
I usually put my patches in a folder called "scripts", change the SlackBuild to suit your needs. The xulrunner.sh file can be found on jong's site.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.