LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   help w/ creating a SlackBuild for icecat (https://www.linuxquestions.org/questions/slackware-14/help-w-creating-a-slackbuild-for-icecat-679425/)

khronosschoty 10-27-2008 05:43 PM

help w/ creating a SlackBuild for icecat
 
OK I am building a SlackBuild for icecat. This is proving much more challenging then the last SlackBuild script I wrote (with the aids of templates). I am attempting to write this one with the aid of templates as well. Fact is I am not all that skilled and have only written one SlackBuild. Yet I firmly get the idea. The below code is using the template provided by SlackBuild.org.

Any help would be liked.

I currently keep getting this error.

Code:

checking for cairo >= 1.6.0 freetype2 fontconfig...
Requested 'cairo >= 1.6.0' but version of cairo is 1.4.14
configure: error: Library requirements
(cairo >= 1.6.0 freetype2 fontconfig)
not met; consider adjusting the PKG_CONFIG_PATH
environment variable if your libraries are in
a nonstandard prefix so pkg-config can find them.

I currently do not know how to proceed from here. Also I have looked at Firefox builds and they usualy have a patch. Well I realize icecat is Firefox without the non free branding etc. That is why I want to use icecat.

Thank you in advance.

Code:



PRGNAM=icecat
VERSION=${VERSION:-3.0.2-g1}
ARCH=${ARCH:-pentium4}
BUILD=${BUILD:-1}
TAG=${TAG:-_WGsIII}

CWD=$(pwd)
TMP=${TMP:-/tmp/WGsIII}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/home/empcrono/tmp/build}

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

set -e # Exit on most errors
# If you prefer to do selective error checking with
#  command || exit 1
# then that's also acceptable.

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
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 {} \;

# Your application will probably need different configure flags;
# these are provided as an example only.
# Be sure to build only shared libraries unless there's some need for
# static.
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
 --prefix=/usr \
 --sysconfdir=/etc \
 --localstatedir=/var \
 --libdir=/usr/lib \
 --with-system-nspr \
 --with-system-nss \
 --with-system-jpeg \
 --with-system-zlib \
 --with-pthreads \
 --enable-optimize="$SLKCFLAGS" \
 --enable-xinerama \
 --enable-default-toolkit=cairo-gtk2 \
 --enable-strip \
 --enable-pango \
 --enable-system-cairo \
 --enable-svg \
 --enable-canvas \
 --enable-startup-notification \
 --enable-safe-browsing \
 --with-branding=browser/branding/unofficial \

# Compile the application and install it into the $PKG directory
make
make install DESTDIR=$PKG

# Strip binaries and libraries - this can be done with 'make install-strip'
# in many source trees, and that's usually acceptable if so, but if not,
# use this:
( cd $PKG
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)


# Remove perllocal.pod and other special files that don't need to be installed,
# as they will overwrite what's already on the system.  If this is not needed,
# remove it from the script.
( cd $PKG
  # Remove 'special' files
  find . -name perllocal.pod \
    -o -name ".packlist" \
    -o -name "*.bs" \
    | xargs rm -f
)

# Copy program documentation into the package
# The included documentation varies from one application to another, so be sure
# to adjust your script as needed
# Also, include the SlackBuild script in the documentation directory
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a <documentation> $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

# Make the package; be sure to leave it in $OUTPUT
# If package symlinks need to be created during install *before*
# your custom contents of doinst.sh runs, then add the -p switch to
# the makepkg command below -- see makepkg(8) for details
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

UPDATE:

I updated the code to reflect the current state of things

Woodsman 10-27-2008 06:05 PM

The icecat package is dependent upon cairo 1.6.0 or greater. Slackware 12.1 provides version 1.4.14. Slackware Current provides version 1.6.4.

khronosschoty 10-28-2008 02:26 PM

Quote:

Originally Posted by Woodsman (Post 3323515)
The icecat package is dependent upon cairo 1.6.0 or greater. Slackware 12.1 provides version 1.4.14. Slackware Current provides version 1.6.4.

Duh! Thank you for taking the time for stating what should have seemed obvious but did not to me.



Any how can any one tell me what the differnce between
the configure options of
Code:

--enable-libxul
--enable-static

The compiler says that only one of those options are permitted.

bgeddy 10-28-2008 04:02 PM

Try running configure --help to see what the options are. I think they are probably to do with building the libxul.so shared library or compiling the functions statically but I'm not sure.

Just an idea but maybe it would be worth looking at an existing Firefox Slackbuild as a learning exercise. I believe Firefox can use .mozconfig configuration files to hold all the configuration options - it may be worth building one of these. You could create a here document from your Slackbuild script if you wanted to create this on the fly.

gnashley 10-28-2008 04:10 PM

I hate to dump ice on you(no pun intended), but I think that building icecat is way ambitious for your first few (hundred) SlackBuilds. First of all, to make it truly icecat, you'll need to apply the patches from debian and some of them are going to cause you heartaches. You could use the official Slackware SlackBuild for SeaMonkey as a starting point since it is the closest thing to that you can get. But still, some of the options used in the SlackBuild will be directly opposed to the essence of what icecat means to be. The Slackware build is an authorized build so it can use the OFFICIAL options which include the Mozilla Foundation branding materials. Most of the icecat modifications deal with removing the official branding icons and name. You'll have to study closely the different configure options used for icecat as opposed to seamonkey. I dare say that simply working with the regular Slackbuild for seamonkey and making *small* changes to that will be enough to convince you that you don't *really* want to fool around with compiling any mozilla stuff -it will drive you crazy very quickly. If you don't know what xul and static compiling are, you will quickly lose your way compiling any moz stuff. It doesn't help that it takes so long to test a compile abd find out if what you are trying is working. Ohhh, I get all bothered just thinking about compiling moz stuff. My God man, save yourself while you still can!
More to the point. libxul is a library which can't be compiled statically, so you have to decide whether you want static or libxul. BTW, getting a statically compiled moz product is the most maddening thing of all, and if you succeed, you'll find that the application needs about 500MB of RAM to run. It will start up a little quicker than a dynamically compiled version though.
My condolences to your family if you decide to proceed...

khronosschoty 10-28-2008 10:31 PM

Quote:

Originally Posted by gnashley
First of all, to make it truly icecat, you'll need to apply the patches from debian

Thank you for your very informative reply. However I am unsure as to why I would need to download a patch from Debian. I downloaded the icecat package from gnuzilla.

Also I had thought of using sea monkey SlackBuild as a reference. However since you brought it up I decided to look at it again. So I am trying to use it as a template instead. Still, since you say I could be at this for some time.... I 'll just give it a few more goes and call it good.


==========================================================================
Other thoughts:

I really do think its important to support the forked version. I am behind the free software movement 99% of the way. I'm no saint mind you. I do flash but aside from a few things here and there I do my best to use 100% free software. The more freedom we keep in our part of the park the better.

I do not care if its a nice dictator, (even though that is better then one who is not), a dictator is a dictator.

gnashley 10-29-2008 03:33 AM

I hadn't noticed that gnuzilla had an already patched version -that should make it easier rather than fooling with the debian patches. As I said, most of the patches(or differences from the original) deal with changing the 'brand' of the product. Still, debian no doubt includes other patches which add features or fix bugs -that's what all the trouble was about to begin with...

khronosschoty 10-29-2008 03:43 PM

Quote:

Originally Posted by gnashley (Post 3324777)
I hadn't noticed that gnuzilla had an already patched version -that should make it easier rather than fooling with the debian patches. As I said, most of the patches(or differences from the original) deal with changing the 'brand' of the product. Still, debian no doubt includes other patches which add features or fix bugs -that's what all the trouble was about to begin with...

I see thanks a lot.


Despite you trying to warn me or even turn me away from creating a icecat package I succeeded. You were, in fact, very helpful. I used the SeaMonkey as a reference. Only one thing did not come out the way I had hoped, and so I am doing some research on the internet on how to proceed from here. The icons never made it. I do not get any of the icecat icons. I do not get any icons at all for that matter.

Thanks every one.


Edit:

Despite all what I wrote above I am beginning to see that this may still be more work.
Reason: Because I am wrestling with gnash & flash.


Other thoughts: It is blazing fast. But other things like very few icons in the actual browser it self. i.e. stop refresh etc.

Update:

I got it all working just one thing left to do. I do not have a icon. I have a full browser theme. I.e. I got stop icon refresh icon inside the browser ware before I did not. Only thing missing is that in the network section of the xfce menu has no icecat icon or entry (and I did put in the SlackBuild).Also I got flash working. I will try to switch over to Gnash but I was going back and forth between them just to see if I could get it working period. Alas With a little work I did get it working. I am currently using 100% free icecat for a web browser.


All times are GMT -5. The time now is 10:38 AM.