Project

General

Profile

Installing Wt on Slackware » History » Version 1

Pieter Libin, 10/29/2009 02:03 PM

1 1 Pieter Libin
h1. Installing Wt on Slackware
2
3
{{toc}}
4
5
By Miguel Suarez Xavier Penteado miguel_penteado@fca.unesp.br
6
7
(sorry by poor english)
8
9
In slackware 12 we have not in default installation 
10
# boost library
11
# asio library _*' --(no asio stand alone and no boost asio)--
12
# mxml 
13
# fastcgi lib 
14
# fastcgi apache mod 
15
# ICU
16
# mysql++
17
# wt
18
19
Then, we need build each previous packages and install it before try compile witty.
20
21
Slackare 12 use slackbuilds to build packges, so we will put here the slackbuilds for packages above 
22
23
*Remember all packets will be generated in /tmp directory*
24
25
26
h3. boost 1.34.1 Slackbuild  
27
28
Before you ctr+c the follow *boost.Slackbuild*, you need to create the *patch* files used by script in same dir where you will save boost.Slackbuild.
29
30
*boost_bjam-gcc42_mod.patch*
31
32
----
33
34
<pre>
35
 Index: tools/jam/src/build.sh
36
 --- tools/jam/src/build.sh.orig	2006-02-03 17:57:42 +0100
37
 +++ tools/jam/src/build.sh	2007-06-17 13:54:31 +0200
38
 @@ -127,7 +127,7 @@
39
      ;;
40
      
41
      gcc)
42
 -    BOOST_JAM_CC=gcc
43
 +    BOOST_JAM_CC="gcc -O0"
44
      ;;
45
      
46
      darwin)
47
 Index: tools/jam/src/build.jam
48
 --- tools/jam/src/build.jam.orig	2007-06-17 14:07:34 +0200
49
 +++ tools/jam/src/build.jam	2007-06-17 14:08:21 +0200
50
 @@ -153,7 +153,7 @@
51
  ## GCC 2.x, 3.x, 4.x
52
  toolset gcc gcc : "-o " : -D
53
      : -pedantic
54
 -    [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
55
 +    [ opt --release : [ opt --symbols : -g : -s ] -O0 ]
56
      [ opt --debug : -g -O0 -fno-inline ]
57
      -I$(--python-include) -Wno-long-long
58
      : -L$(--python-lib[1]) -l$(--python-lib[2]) ;
59
</pre>
60
61
62
----
63
64
*boost-configure.patch*
65
66
----
67
<pre>
68
 *** configure.orig	2007-01-16 01:39:00.000000000 +0100
69
 --- configure	2007-01-19 03:53:08.000000000 +0100
70
 ***************
71
 *** 9,15 ****
72
   
73
   BJAM=""
74
   TOOLSET=""
75
 ! BJAM_CONFIG=""
76
   BUILD=""
77
   PREFIX=/usr/local
78
   EPREFIX=
79
 --- 9,15 ----
80
   
81
   BJAM=""
82
   TOOLSET=""
83
 ! BJAM_CONFIG="-d2 --layout=system variant=release debug-symbols=on"
84
   BUILD=""
85
   PREFIX=/usr/local
86
   EPREFIX=
87
 *************** INCLUDEDIR=$INCLUDEDIR
88
 *** 325,332 ****
89
   LIBS=$LIBS
90
   
91
   all: .dummy
92
 ! 	@echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS)"
93
 ! 	@\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) || \\
94
   	echo "Not all Boost libraries built properly."
95
   
96
   clean: .dummy
97
 --- 325,332 ----
98
   LIBS=$LIBS
99
   
100
   all: .dummy
101
 ! 	@echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) stage"
102
 ! 	@\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) stage || \\
103
   	echo "Not all Boost libraries built properly."
104
   
105
   clean: .dummy
106
 
107
</pre>
108
----
109
110
*boost-gcc-soname.patch*
111
112
----
113
<pre>
114
 *** tools/build/v2/tools/gcc.jam.orig	2007-05-03 08:09:04.000000000 +0200
115
 --- tools/build/v2/tools/gcc.jam	2007-06-26 20:37:44.000000000 +0200
116
 *************** if [ os.name ] != NT && [ os.name ] != O
117
 *** 316,322 ****
118
       # expected, therefore it has been disabled.
119
   
120
       HAVE_SONAME   = "" ;
121
 !     SONAME_OPTION = -h ;
122
   }
123
   
124
   
125
 --- 316,323 ----
126
       # expected, therefore it has been disabled.
127
   
128
       HAVE_SONAME   = "" ;
129
 !     SONAME_OPTION = -soname ;
130
 !     SONAME_VERSION = 3 ;
131
   }
132
   
133
   
134
 *************** rule link.dll ( targets * : sources * : 
135
 *** 631,637 ****
136
   # Differ from 'link' above only by -shared.
137
   actions link.dll bind LIBRARIES
138
   {
139
 !     "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
140
   }
141
   
142
   # Set up threading support. It's somewhat contrived, so perform it at the end,
143
 --- 632,638 ----
144
   # Differ from 'link' above only by -shared.
145
   actions link.dll bind LIBRARIES
146
   {
147
 !     "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=).$(SONAME_VERSION) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-ST) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS)
148
   }
149
   
150
   # Set up threading support. It's somewhat contrived, so perform it at the end, 
151
</pre>
152
153
----
154
155
*boost-use-rpm-optflags.patch*
156
157
----
158
<pre>
159
 *** tools/build/v2/tools/gcc.jam.orig	2007-08-01 01:17:16.000000000 -0500
160
 --- tools/build/v2/tools/gcc.jam	2007-08-01 01:17:46.000000000 -0500
161
 *************** flags gcc.compile PCH_FILE <pch>on : <pc
162
 *** 268,274 ****
163
   
164
   # Declare flags and action for compilation
165
   flags gcc.compile OPTIONS <optimization>off : -O0 ;
166
 ! flags gcc.compile OPTIONS <optimization>speed : -O3 ;
167
   flags gcc.compile OPTIONS <optimization>space : -Os ;
168
   
169
   flags gcc.compile OPTIONS <inlining>off : -fno-inline ;
170
 --- 268,274 ----
171
   
172
   # Declare flags and action for compilation
173
   flags gcc.compile OPTIONS <optimization>off : -O0 ;
174
 ! flags gcc.compile OPTIONS <optimization>speed : "$RPM_OPT_FLAGS" ;
175
   flags gcc.compile OPTIONS <optimization>space : -Os ;
176
   
177
   flags gcc.compile OPTIONS <inlining>off : -fno-inline ;
178
</pre>
179
180
181
----
182
183
Now you need download im place where you put patches ( and will put boost.Slackbuild ) the sorces used by scripts of corse. If you to read boost.script , will see script uses two files in build process:
184
185
*boost_asio* on http://sourceforge.net/project/showfiles.php?group_id=122478 or if you prefer directly on 
186
http://easynews.dl.sourceforge.net/sourceforge/asio/asio-0.3.8rc3.tar.gz
187
188
*Adobe GPL GIL* (just for enhace your boost lib) on http://opensource.adobe.com/gil/download.html or directly on http://opensource.adobe.com/gil/gil.tar.gz
189
190
finily _*' boost 1.34.1 _*' on http://sourceforge.net/project/showfiles.php?group_id=7586 or directly on
191
http://easynews.dl.sourceforge.net/sourceforge/boost/boost_1_34_1.tar.bz2
192
(boost.Slackbuild will compile your bjam -ARGH!!- (a ./configure like autotool system) ) in your system , and you will not need download bjam binary.
193
194
----
195
196
This Slackbuild is based on boost.SlackBuild,v 1.6 2007/09/04 of Eric Hameleers <alien@slackware.com>
197
and boost.spec from boost-1.34.0-2.el5.src.rpm from Red Hat Enterprise linux
198
199
*boost.Slackbuild*
200
----
201
<pre>
202
 #!/bin/sh
203
 # $Id: boost.SlackBuild,v 1.6 2007/09/04 23:08:43 root Exp root $
204
 # Copyright (c) 2007 Eric Hameleers <alien@slackware.com>
205
 # All rights reserved.
206
 #
207
 #   Permission to use, copy, modify, and distribute this software for
208
 #   any purpose with or without fee is hereby granted, provided that
209
 #   the above copyright notice and this permission notice appear in all
210
 #   copies.
211
 #
212
 #   THIS SOFTWARE IS PROVIDED ``AS IS*_ AND ANY EXPRESSED OR IMPLIED
213
 #   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
214
 #   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
215
 #   IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
216
 #   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
217
 #   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
218
 #   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
219
 #   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
220
 #   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
221
 #   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
222
 #   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
223
 #   SUCH DAMAGE.
224
 #
225
 # Slackware SlackBuild script 
226
 # ===========================
227
 # By:        Eric Hameleers <alien@slackware.com>
228
 # For:       boost
229
 # Descr:     collection of portable C++ source libraries
230
 # URL:       http://www.boost.org/
231
 # Needs:     
232
 # Changelog:
233
 # 1.34.1-1   01/10/2007 by Miguel Suarez Xavier Penteado <miguel_penteado@fca.unesp.br>
234
 # 1.33.1-1:  23/Dec/2006 by Eric Hameleers <alien@slackware.com>
235
 #            * Initial build.
236
 # 1.34.0-1:  04/Sep/2007 by Eric Hameleers <alien@slackware.com>
237
 #            * Update, Slackware 12.0 package.
238
 # 
239
 # Run 'sh boost.SlackBuild --cleanup' to build a Slackware package.
240
 # The package (.tgz) plus descriptive .txt file are created in /tmp .
241
 # Install using 'installpkg'. 
242
 #
243
 # Set initial variables:
244
 
245
 echo "Setting variables ..."
246
 echo "Setando variaveis ..."
247
 
248
 PRGNAM=boost
249
 VERSION=${VERSION:-1.34.1}
250
 SRCVER=$(echo ${VERSION} | tr '.' '_')
251
 ARCH=${ARCH:-i486}
252
 BUILD=${BUILD:-1}
253
 
254
 # This is the python we build against:
255
 PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
256
 PYTHON_FLAGS="-sPYTHON_ROOT=/usr -sPYTHON_VERSION=$PYTHON_VERSION" 
257
 
258
 DOCS="README LICENSE_1_0.txt people wiki"
259
 
260
 # Where do we look for sources?
261
 CWD=$(pwd)
262
 SRCDIR=$(dirname $0)
263
 [ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR}
264
 
265
 # Place to build (TMP) package (PKG) and output (OUTPUT) the program:
266
 TMP=${TMP:-/tmp/build}
267
 PKG=$TMP/package-$PRGNAM
268
 OUTPUT=${OUTPUT:-/tmp}
269
 
270
 ###################################################################################
271
 ASIO=boost_asio
272
 VER_ASIO="0_3_8rc3"
273
 SOURCE_ASIO="$SRCDIR/${ASIO}_${VER_ASIO}.tar.gz"
274
 PKG_ASIO=$TMP/package-$ASIO
275
 
276
 ################################################################################### 
277
 
278
 ###################################################################################
279
 GIL=gil
280
 VER_GIL="2.1.1"
281
 SOURCE_GIL="$SRCDIR/${GIL}-${VER_GIL}.tar.gz"
282
 PKG_GIL=$TMP/package-$GIL 
283
 
284
 ###################################################################################
285
 
286
 
287
 # Input URL: http://dl.sourceforge.net/boost/boost_1_34_1.tar.gz
288
 SOURCE="$SRCDIR/${PRGNAM}_${SRCVER}.tar.gz"
289
 SRCURL="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}_${SRCVER}.tar.gz" 
290
 
291
 
292
 # Exit the script on errors:
293
 set -e
294
 trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
295
 # Catch unitialized variables:
296
 set -u
297
 P1=${1:-1}
298
 
299
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
300
 echo -e  '\E[01;33;40m'"Setando a vers~ao de gcc para 3.3.x ou 4.2.x"          ;tput sgr0;
301
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
302
 echo -e '\E[01;32;40m'
303
 
304
 # Slackware 11 and up need other option (gcc > 3.3.x)
305
 if [ $(gcc -dumpversion | tr -d  '.' |cut -c 1-2) -gt 33 ]; then
306
 MOPT=tune
307
 else
308
 MOPT=cpu
309
 fi
310
 
311
 case "$ARCH" in
312
 i386)      SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686" 
313
 	SLKLDFLAGS=""; LIBDIRSUFFIX="" 
314
 	;;
315
 i486)      SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686"
316
 	SLKLDFLAGS=""; LIBDIRSUFFIX=""
317
 	;;
318
 s390)      SLKCFLAGS="-O2"
319
 	SLKLDFLAGS=""; LIBDIRSUFFIX=""
320
 	;;
321
 powerpc)   SLKCFLAGS="-O2"
322
 	SLKLDFLAGS=""; LIBDIRSUFFIX=""
323
 	;;
324
 x86_64)    SLKCFLAGS="-O2 -fPIC"
325
 	SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
326
 	;;
327
 athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer"
328
 	SLKLDFLAGS=""; LIBDIRSUFFIX=""
329
 	;;
330
 esac
331
 
332
 # Create working directories:
333
 mkdir -p $TMP/tmp-$PRGNAM # location to build the source
334
 rm -rf $TMP/tmp-$PRGNAM/* # By default we remove the remnants of previous build
335
 mkdir -p $PKG     # place for the package to be built
336
 rm -rf $PKG/*     # We always erase old package's contents:
337
 mkdir -p $OUTPUT  # place for the package to be saved
338
 
339
 # Source file availability:
340
 if ! [ -f ${SOURCE} ]; then
341
 if ! [ "x${SRCURL}" == "x" ]; then
342
 # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
343
 [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)"
344
 echo "Source '$(basename ${SOURCE})' not available yet..."
345
 echo "Will download file to $(dirname $SOURCE)"
346
 wget -nv --connect-timeout=30 -O "${SOURCE}" "${SRCURL}" || true
347
 if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
348
 echo "Downloading '$(basename ${SOURCE})' failed... aborting the build."
349
 mv -f "${SOURCE}" "${SOURCE}".FAIL
350
 exit 1
351
 fi
352
 else
353
 echo "File '$(basename ${SOURCE})' not available... aborting the build."
354
 exit 1
355
 fi
356
 fi
357
 
358
 if [ "$P1" == "--download" ]; then
359
 echo "Download complete."
360
 exit 0
361
 fi
362
 
363
 
364
 #################################################################################################
365
 # --- PACKAGE BUILDING ---
366
 
367
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
368
 echo -e  '\E[01;33;40m'"extraindo arquivos"                                    ;tput sgr0;
369
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
370
 echo -e '\E[01;36;40m' 
371
 
372
 echo "++================="
373
 echo "|| $PRGNAM-$VERSION"
374
 echo "++================="
375
 
376
 cd $TMP/tmp-$PRGNAM
377
 echo "Extracting the source archive(s) for $PRGNAM..."
378
 if $(file ${SOURCE} | grep -q ": bzip2"); then
379
 tar -xjvf ${SOURCE}
380
 elif $(file ${SOURCE} | grep -q ": gzip"); then
381
 tar -xzvf ${SOURCE}
382
 fi
383
 mv ${PRGNAM}_${SRCVER} ${PRGNAM}-${VERSION}
384
 cd ${PRGNAM}-${VERSION}
385
 BUILD_DIR_BOOST=`pwd`
386
 chown -R root:root .
387
 chmod -R u+w,go+r-w,a-s .
388
 
389
 
390
 
391
 #################################################################################################
392
 mkdir -p $TMP/tmp-$ASIO # location to build the source
393
 rm -rf $TMP/tmp-$ASIO/* # By default we remove the remnants of previous build
394
 
395
 cd $TMP/tmp-$ASIO
396
 echo "Extracting the SOURCE_ASIO archive(s) for $ASIO..."
397
 if $(file ${SOURCE_ASIO} | grep -q ": bzip2"); then
398
 tar -xjvf ${SOURCE_ASIO}
399
 elif $(file ${SOURCE_ASIO} | grep -q ": gzip"); then
400
 tar -xzvf ${SOURCE_ASIO}
401
 fi
402
 mv ${ASIO}_${VER_ASIO} ${ASIO}-${VER_ASIO}
403
 cd ${ASIO}-${VER_ASIO}
404
 chown -R root:root .
405
 chmod -R u+w,go+r-w,a-s .
406
 
407
 cp -a boost/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
408
 cp -a  libs/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
409
 
410
 #################################################################################################
411
 
412
 #################################################################################################
413
 mkdir -p $TMP/tmp-$GIL # location to build the source
414
 rm -rf $TMP/tmp-$GIL/* # By default we remove the remnants of previous build
415
 
416
 cd $TMP/tmp-$GIL
417
 echo "Extracting the SOURCE_GIL archive(s) for $GIL..."
418
 if $(file ${SOURCE_GIL} | grep -q ": bzip2"); then
419
 tar -xjvf ${SOURCE_GIL}
420
 elif $(file ${SOURCE_GIL} | grep -q ": gzip"); then
421
 tar -xzvf ${SOURCE_GIL}
422
 fi
423
 
424
 cd ${GIL}-${VER_GIL}
425
 chown -R root:root .
426
 chmod -R u+w,go+r-w,a-s .
427
 
428
 cp -a boost/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
429
 cp -a  libs/ $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}
430
 
431
 #################################################################################################
432
 
433
 cd $BUILD_DIR_BOOST
434
 
435
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
436
 echo -e  '\E[01;33;40m'"aplicando o patch para gcc 4.2.x          "            ;tput sgr0;
437
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
438
 echo -e '\E[01;32;40m'
439
 
440
 cp -a $CWD/boost_bjam-gcc42_mod.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
441
 
442
 patch -p0 < boost_bjam-gcc42_mod.patch
443
 
444
 # echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
445
 # echo -e  '\E[01;33;40m'"aplicando o patch para Thread          "            ;tput sgr0;
446
 # echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
447
 # echo -e '\E[01;32;40m'
448
 # 
449
 # cp -a $CWD/boost-thread.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
450
 # 
451
 # patch -p0 < boost-thread.patch
452
 
453
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
454
 echo -e  '\E[01;33;40m'"aplicando o patch para Configure          "            ;tput sgr0;
455
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
456
 echo -e '\E[01;32;40m'
457
 
458
 cp -a $CWD/boost-configure.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
459
 
460
 patch -p0 < boost-configure.patch
461
 
462
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
463
 echo -e  '\E[01;33;40m'"aplicando o patch para boost-gcc-soname.patch    "     ;tput sgr0;
464
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
465
 echo -e '\E[01;32;40m'
466
 
467
 cp -a $CWD/boost-gcc-soname.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
468
 
469
 patch -p0 < boost-gcc-soname.patch
470
 
471
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
472
 echo -e  '\E[01;33;40m'"aplicando o patch para boost-use-rpm-optflags.patch "  ;tput sgr0;
473
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
474
 echo -e '\E[01;32;40m'
475
 
476
 cp -a $CWD/boost-use-rpm-optflags.patch $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}/
477
 
478
 patch -p0 < boost-use-rpm-optflags.patch
479
 
480
 
481
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
482
 echo -e  '\E[01;33;40m'"Construindo BJAM                          "            ;tput sgr0;
483
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
484
 echo -e '\E[01;36;40m'
485
 
486
 
487
 echo Building ...
488
 export LDFLAGS="$SLKLDFLAGS"
489
 export CFLAGS="$SLKCFLAGS"
490
 export CXXFLAGS="$SLKCFLAGS"
491
 
492
 BOOST_ROOT=`pwd`
493
 staged_dir=stage
494
 export BOOST_ROOT
495
 
496
 
497
 # First build bjam, the boost build system:
498
 ( cd tools/jam/src
499
 ./build.sh gcc 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
500
 ) || exit $?
501
 BJAM=$(find tools/jam/src/ -name bjam -a -type f)
502
 
503
 # Create build subdirectory
504
 mkdir -p obj
505
 
506
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
507
 echo -e '\E[01;33;40m'"Configure                                         "     ;tput sgr0;
508
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
509
 echo -e '\E[01;32;40m'
510
 
511
 #"-sBUILD=<optimization>speed <runtime-link>shared <runtime-link>static <inlining>full <threading>single/multi " 
512
 # Next, we build boost using bjam
513
 echo "Building boost now..."
514
 $BJAM \
515
 release \
516
 "-d2 -sBUILD= <runtime-link>shared  <threading>multi " \
517
 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=/usr/include" "-sZLIB_LIBPATH=/usr/lib" \
518
 "-sBZIP2_INCLUDE=/usr/include" "-sBZIP2_LIBPATH=/usr/lib" \
519
 --toolset=gcc --layout=system --builddir=obj \
520
 --prefix=/usr \
521
 $PYTHON_FLAGS \
522
 stage \
523
 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
524
 
525
 
526
 # ./configure \
527
 # --with-bjam=$BJAM \
528
 # --with-toolset=gcc \
529
 # --prefix=/usr \
530
 # --with-libraries=all \
531
 # --with-python=/usr/bin/python \
532
 # --with-python-root=/usr \
533
 # --with-python-version=$PYTHON_VERSION 
534
 # #--with-icu \
535
 # #--with-icu=DIR \
536
 
537
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
538
 echo -e '\E[01;33;40m'"Construindo boost                                 "     ;tput sgr0;
539
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
540
 echo -e '\E[01;33;40m'
541
 
542
 # make all
543
 
544
 
545
 
546
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
547
 echo -e '\E[01;33;40m'"Instalando o boost em `pwd`                       "     ;tput sgr0;
548
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
549
 echo -e '\E[01;34;40m'
550
 
551
 echo "Installing boost now..."
552
 $BJAM \
553
 release \
554
 --toolset=gcc --layout=system --link=shared --builddir=obj \
555
 --prefix=$PKG/usr \
556
 $PYTHON_FLAGS \
557
 install \
558
 2>&1 | tee $OUTPUT/install-${PRGNAM}.log
559
 
560
 
561
 
562
 # And then install boost..
563
 mkdir -p $PKG/usr/{bin,lib,include}
564
 mkdir -p $PKG/usr/share/${PRGNAM}-${VERSION}
565
 cp -a $BJAM $PKG/usr/bin
566
 
567
 #install lib
568
 for i in `find stage -type f -name \*.a`; do
569
 NAME=`basename $i`;
570
 install -p -m 0644 $i $PKG/usr/lib/$NAME;
571
 done;
572
 
573
 for i in `find stage -type f -name \*.so`; do
574
 NAME=$i;
575
 SONAME=$i.3;
576
 VNAME=$i.${VERSION};
577
 base=`basename $i`;
578
 NAMEbase=$base;
579
 SONAMEbase=$base.3;
580
 VNAMEbase=$base.${VERSION};
581
 mv $i $VNAME;
582
 ln -s $VNAMEbase $SONAME;
583
 ln -s $VNAMEbase $NAME;
584
 install -p -m 755 $VNAME $PKG/usr/lib/$VNAMEbase;
585
 mv $SONAME $PKG/usr/lib/$SONAMEbase;
586
 mv $NAME $PKG/usr/lib/$NAMEbase;
587
 done;
588
 
589
 
590
 ## Move incorrectly installed include files
591
 if [ -d $PKG/usr/include/${PRGNAM}-${VERSION} ]; then
592
 echo -e '\E[01;33;40m'"Movendo os Includes boost para $PKG/usr/include/  "     ;tput sgr0;
593
 echo -e '\E[01;34;40m'
594
 mv $PKG/usr/include/${PRGNAM}-${VERSION}/boost $PKG/usr/include/
595
 rmdir $PKG/usr/include/${PRGNAM}-${VERSION}
596
 fi
597
 
598
 
599
 
600
 # Add documentation:
601
 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
602
 cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
603
 chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/*
604
 
605
 # Strip binaries:
606
 cd $PKG
607
 find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
608
 find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
609
 cd -
610
 
611
 # Add a package description:
612
 mkdir -p $PKG/install
613
 cat $SRCDIR/slack-desc > $PKG/install/slack-desc
614
 if [ -f $SRCDIR/doinst.sh ]; then
615
 cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
616
 fi
617
 
618
 # Build the package:
619
 cd $PKG
620
 makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
621
 cd $OUTPUT
622
 md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5
623
 cd -
624
 cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt
625
 
626
 # Clean up the extra stuff:
627
 if [ "$P1" = "--cleanup" ]; then
628
 rm -rf $TMP/tmp-$PRGNAM
629
 rm -rf $PKG
630
 fi
631
 tput sgr0; 
632
</pre>
633
634
635
----
636
637
638
h3. asio 0.3.7 standalone library Slackbuild  
639
640
Next step: we will patch and compile asio-0.3.7.tar.gz . Use asio 0.3.7 version , is working. 
641
#Patch asio-0.3.7 standalone
642
643
asio_openssl_init.patch
644
----
645
<pre>
646
 --- ./include/asio/ssl/detail/openssl_init.hpp.orig	2006-11-15 00:10:08.000000000 +0100
647
 +++ ./include/asio/ssl/detail/openssl_init.hpp	2006-11-15 00:10:38.000000000 +0100
648
 @@ -45,13 +45,13 @@
649
        {
650
          ::SSL_library_init();
651
          ::SSL_load_error_strings();        
652
 +        ::OpenSSL_add_ssl_algorithms();
653
  
654
          mutexes_.resize(::CRYPTO_num_locks());
655
          for (size_t i = 0; i < mutexes_.size(); ++i)
656
            mutexes_[i].reset(new asio::detail::mutex);
657
          ::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
658
  
659
 -        ::OpenSSL_add_ssl_algorithms();
660
        }
661
      }
662
</pre>
663
664
----
665
Getting Asio 0.3.7 library
666
You may open asio's homepage http://asio.sourceforge.net/ or get asio with this direct link
667
http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/a/as/asio/asio-0.3.7.tar.gz
668
669
----
670
_*' asio.Slackbuild _*'
671
672
<pre>
673
 #!/bin/sh 
674
 
675
 PRGNAM=asio
676
 VERSION=0.3.7
677
 ARCH=${ARCH:-i486}
678
 BUILD=${BUILD:-1}
679
 TAG=${TAG:-MSXP}
680
 CWD=$(pwd)
681
 TMP=${TMP:-/tmp}	
682
 PKG=$TMP/package-$PRGNAM
683
 OUTPUT=${OUTPUT:-/tmp} 
684
 
685
 if [ "$ARCH" = "i486" ]; then
686
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
687
 elif [ "$ARCH" = "i686" ]; then
688
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
689
 fi
690
 
691
 rm -rf $PKG
692
 mkdir -p $TMP $PKG $OUTPUT
693
 cd $TMP || exit 1
694
 rm -rf $PRGNAM-$VERSION
695
 tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
696
 cd $PRGNAM-$VERSION || exit 1
697
 chown -R root:root .
698
 chmod -R u+w,go+r-w,a-s .
699
 
700
 echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;
701
 echo -e '\E[01;33;40m'"aplicando o patch para $TMP/$PRGNAM-$VERSION  em`pwd` "               ;tput sgr0;
702
 echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;
703
 echo -e '\E[01;32;40m'
704
 
705
 cp -a $CWD/asio_openssl_init.patch $TMP/$PRGNAM-$VERSION/ 
706
 
707
 patch -p0 < asio_openssl_init.patch
708
 
709
 
710
 echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;
711
 echo -e '\E[01;33;40m'"execucao do script configure para $PRGNAM-$VERSION  em`pwd` "    ;tput sgr0;
712
 echo -e '\E[01;32;40m'"****************************************************************";tput sgr0;
713
 echo -e '\E[01;36;40m'
714
 
715
 CFLAGS="$SLKCFLAGS" \
716
 CXXFLAGS="$SLKCFLAGS" \
717
 ./configure \
718
  --prefix=/usr \
719
  --sysconfdir=/etc \
720
  --localstatedir=/var \
721
  --with-boost=/usr \
722
  --with-openssl=/usr
723
 
724
 echo -e '\E[01;32;40m'"****************************************************************"     ;tput sgr0;
725
 echo -e '\E[01;33;40m'"execucao de make configure para $PRGNAM-$VERSION  em`pwd`   "         ;tput sgr0;
726
 echo -e '\E[01;32;40m'"****************************************************************"     ;tput sgr0;
727
 echo -e '\E[01;34;40m'
728
 
729
 make 
730
 
731
 echo -e '\E[01;32;40m'"******************************************************************"     ;tput sgr0;
732
 echo -e '\E[01;33;40m'"execucao de make install configure para $PRGNAM-$VERSION  em`pwd` "     ;tput sgr0;
733
 echo -e '\E[01;32;40m'"******************************************************************"     ;tput sgr0;
734
 echo -e '\E[01;33;40m'
735
 
736
 make install DESTDIR=$PKG
737
 
738
 echo -e '\E[01;32;40m'"****************************************************************"     ;tput sgr0;
739
 echo -e '\E[01;33;40m'"Criando o pacote $PRGNAM-$VERSION  em`pwd`                  "         ;tput sgr0;
740
 echo -e '\E[01;32;40m'"****************************************************************"     ;tput sgr0;
741
 echo -e '\E[01;32;40m' 
742
 
743
 if [ -d $PKG/usr/man ]; then
744
 ( cd $PKG/usr/man
745
   find . -type f -exec gzip -9 {} \;
746
   for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
747
 )
748
 fi
749
 
750
 mkdir -p $PKG/install
751
 cat $CWD/slack-desc > $PKG/install/slack-desc
752
 
753
 cd $PKG
754
 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
755
 
756
 tput sgr0;
757
</pre>
758
759
----
760
761
762
h3. mxml 2.3 library Slackbuild  
763
764
Next step we will download Mini XML 2.3 version on
765
http://www.minixml.org/software.php or in direct link
766
http://ftp.easysw.com/pub/mxml/2.3/mxml-2.3.tar.gz
767
768
----
769
*mxml.SlackBuild*
770
771
<pre>
772
 #!/bin/sh
773
 
774
 # Slackware build script for mxml 
775
 # Original form Written by Chess Griffin <chess at chessgriffin dot com>
776
 # Adapted by Miguel Suarez Xavier Penteado <miguel_penteado@fca.unesp.br> 
777
 
778
 PRGNAM=mxml
779
 VERSION=2.3
780
 ARCH=${ARCH:-i486}
781
 BUILD=${BUILD:-1}
782
 TAG=${TAG:-MSXP}
783
 CWD=$(pwd)
784
 TMP=${TMP:-/tmp/SBo}	
785
 PKG=$TMP/package-$PRGNAM
786
 OUTPUT=${OUTPUT:-/tmp}
787
 
788
 if [ "$ARCH" = "i486" ]; then
789
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
790
 elif [ "$ARCH" = "i686" ]; then
791
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
792
 fi
793
 
794
 rm -rf $PKG
795
 mkdir -p $TMP $PKG $OUTPUT
796
 cd $TMP || exit 1
797
 rm -rf $PRGNAM-$VERSION
798
 tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
799
 cd $PRGNAM-$VERSION || exit 1
800
 chown -R root:root .
801
 chmod -R u+w,go+r-w,a-s .
802
 
803
 
804
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
805
 echo -e  '\E[01;33;40m'"Confire mxml in `pwd`                            ";tput sgr0;
806
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
807
 echo -e '\E[01;35;40m';
808
  
809
 CFLAGS="$SLKCFLAGS" \
810
 CXXFLAGS="$SLKCFLAGS" \
811
 ./configure \
812
  --prefix=/usr \
813
  --sysconfdir=/etc \
814
  --localstatedir=/var \
815
  --enable-static=no 
816
 
817
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
818
 echo -e  '\E[01;33;40m'"make mxml in `pwd`                               ";tput sgr0;
819
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
820
 echo -e '\E[01;36;40m';
821
  
822
 make 
823
 
824
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
825
 echo -e  '\E[01;33;40m'"make install mxml in `pwd`                        ";tput sgr0;
826
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
827
 echo -e '\E[01;37;40m';
828
  
829
 make install BUILDROOT=$PKG 
830
  
831
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
832
 echo -e '\E[01;33;40m'" Building packge mxml in `pwd`                    ";tput sgr0;
833
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
834
 echo -e '\E[01;35;40m'; 
835
 
836
 if [ -d $PKG/usr/man ]; then
837
 ( cd $PKG/usr/man
838
   find . -type f -exec gzip -9 {} \;
839
   for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
840
 )
841
 fi
842
 
843
 mkdir -p $PKG/install
844
 cat $CWD/slack-desc > $PKG/install/slack-desc
845
 
846
 cd $PKG
847
 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
848
 tput sgr0;
849
</pre>
850
851
<pre>
852
 
853
</pre>
854
855
----
856
857
858
h3. Fastcgi-2.4.0 Slackbuild  
859
860
This slackbuild will install fastcgi library in your Slackware 12 ! You will need Fastcgi library plus apache modules. Lets get Library first.
861
862
You can download fcgi sorces at http://www.fastcgi.com/ or in this direct link
863
http://www.fastcgi.com/dist/fcgi.tar.gz You will get 2.4.0 version
864
865
866
----
867
Before, you must save this patch in sources tar directory 
868
869
<pre>
870
 The patch have 5.117 lines ... sorry try without him
871
</pre>
872
873
----
874
875
then you may use fastcgi.Slackbuild
876
----
877
*fastcgi.Slackbuild*
878
879
<pre>
880
 #!/bin/sh
881
 
882
 # Slackware build script for mysql++ 
883
 # Written by Chess Griffin <chess at chessgriffin dot com> 
884
 # Adapted by Miguel Suarez Xavier Penteado <miguel_penteado@fca.unesp.br>
885
 
886
 PRGNAM=fcgi
887
 VERSION=2.4.0
888
 ARCH=${ARCH:-i486}
889
 BUILD=${BUILD:-1}
890
 TAG=${TAG:-MSXP}
891
 CWD=$(pwd)
892
 TMP=${TMP:-/tmp/SBo}	
893
 PKG=$TMP/package-$PRGNAM
894
 OUTPUT=${OUTPUT:-/tmp}
895
 
896
 if [ "$ARCH" = "i486" ]; then
897
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
898
 elif [ "$ARCH" = "i686" ]; then
899
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
900
 fi
901
 
902
 rm -rf $PKG
903
 mkdir -p $TMP $PKG $OUTPUT
904
 cd $TMP || exit 1
905
 rm -rf $PRGNAM-$VERSION
906
 #tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
907
 tar -xzvf $CWD/$PRGNAM.tar.gz || exit 1
908
 cd $PRGNAM-$VERSION || exit 1
909
 chown -R root:root .
910
 chmod -R u+w,go+r-w,a-s .
911
 chmod a-x include/fcgios.h libfcgi/os_unix.c
912
 
913
 cp $CWD/fcgi-2.4.0-autotools.patch $PKG/$PRGNAM-$VERSION
914
 patch -p0 <  $PKG/$PRGNAM-$VERSION/fcgi-2.4.0-autotools.patch
915
 
916
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
917
 echo -e '\E[01;33;40m'"configurando em "`pwd`                                 ;tput sgr0;
918
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
919
 echo -e '\E[01;36;40m'
920
 
921
 CFLAGS="$SLKCFLAGS" \
922
 CXXFLAGS="$SLKCFLAGS" \
923
 ./configure \
924
  --prefix=/usr \
925
  --sysconfdir=/etc \
926
  --localstatedir=/var
927
 
928
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
929
 echo -e '\E[01;33;40m'"make em "`pwd`            ;tput sgr0;
930
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
931
 echo -e '\E[01;32;40m'
932
 make 
933
 
934
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
935
 echo -e '\E[01;33;40m'"make install "`pwd`            ;tput sgr0;
936
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
937
 echo -e '\E[01;38;40m' 
938
 
939
 make install DESTDIR=$PKG
940
 
941
 
942
 if [ -d $PKG/usr/man ]; then
943
 ( cd $PKG/usr/man
944
   find . -type f -exec gzip -9 {} \;
945
   for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
946
 )
947
 fi
948
 
949
 mkdir -p $PKG/install
950
 cat $CWD/slack-desc > $PKG/install/slack-desc 
951
 
952
 cd $PKG
953
 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
954
 tput sgr0;
955
 
956
</pre>
957
958
----
959
960
h3. Modfastcgi-2.4.2 for apache Slackbuild  
961
962
The mod_fastcgi will generate a patch for your apache 2.x.x modules
963
964
Get the module source http://www.fastcgi.com/ or directly here
965
http://www.fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
966
967
968
----
969
patch
970
*mod_fastcgi-2.4.2-update.patch*
971
<pre>
972
 sorry, to big 774 lines ... search in google, or try without it
973
</pre>
974
975
----
976
Patch for you save in Sorce + Slackbuilds dir
977
978
_*' mod_fastcgi-2.4.2-apache2.2.patch*
979
<pre>
980
 --- mod_fastcgi-2.4.2/fcgi.h	2006-03-22 16:59:55.000000000 +0000
981
 +++ mod_fastcgi-2.4.2/fcgi.h	2006-03-22 17:04:41.000000000 +0000
982
 @@ -73,6 +73,36 @@
983
  #define ap_reset_timeout(a)
984
  #define ap_unblock_alarms()
985
  
986
 +/* starting with apache 2.2 the backward-compatibility defines for
987
 + * 1.3 APIs are not available anymore. Define them ourselves here.
988
 + */
989
 +#ifndef ap_copy_table
990
 +
991
 +#define ap_copy_table apr_table_copy
992
 +#define ap_cpystrn apr_cpystrn
993
 +#define ap_destroy_pool apr_pool_destroy
994
 +#define ap_isspace apr_isspace
995
 +#define ap_make_array apr_array_make
996
 +#define ap_make_table apr_table_make
997
 +#define ap_null_cleanup apr_pool_cleanup_null 
998
 +#define ap_palloc apr_palloc
999
 +#define ap_pcalloc apr_pcalloc
1000
 +#define ap_psprintf apr_psprintf
1001
 +#define ap_pstrcat apr_pstrcat
1002
 +#define ap_pstrdup apr_pstrdup
1003
 +#define ap_pstrndup apr_pstrndup
1004
 +#define ap_push_array apr_array_push
1005
 +#define ap_register_cleanup apr_pool_cleanup_register
1006
 +#define ap_snprintf apr_snprintf
1007
 +#define ap_table_add apr_table_add
1008
 +#define ap_table_do apr_table_do
1009
 +#define ap_table_get apr_table_get
1010
 +#define ap_table_set apr_table_set
1011
 +#define ap_table_setn apr_table_setn
1012
 +#define ap_table_unset apr_table_unset
1013
 +
1014
 +#endif /* defined(ap_copy_table) */
1015
 +
1016
  #if (defined(HAVE_WRITEV) && !HAVE_WRITEV && !defined(NO_WRITEV)) || defined WIN32
1017
  #define NO_WRITEV
1018
  #endif
1019
 --- mod_fastcgi-2.4.2/Makefile.AP2	2006-03-22 17:04:55.000000000 +0000
1020
 +++ mod_fastcgi-2.4.2/Makefile.AP2	2006-03-22 17:05:22.000000000 +0000
1021
 @@ -20,8 +20,6 @@
1022
  
1023
  all: local-shared-build
1024
 
1025
 -install: install-modules
1026
 -
1027
  clean:
1028
  	-rm -f *.o *.lo *.slo *.la
1029
</pre>
1030
1031
----
1032
Outro patch para voce slavar junto ao fonte e aos slackbuilds
1033
1034
_*' mod_fastcgi-2.4.2-fix_warnings.patch*
1035
1036
<pre>
1037
 --- mod_fastcgi-2.4.2/fcgi_config.c	2007-05-25 16:01:49.000000000 +0200
1038
 +++ mod_fastcgi-2.4.2/fcgi_config.c	2007-05-25 16:06:42.000000000 +0200
1039
 @@ -694,7 +694,7 @@
1040
                  return invalid_value(tp, name, fs_path, option, err);
1041
          }
1042
          else if (strcasecmp(option, "-min-server-life") == 0) {
1043
 -            if ((err = get_int(tp, &arg, &s->minServerLife, 0)))
1044
 +            if ((err = get_u_int(tp, &arg, &s->minServerLife, 0)))
1045
                  return invalid_value(tp, name, NULL, option, err);
1046
          }
1047
          else if (strcasecmp(option, "-priority") == 0) {
1048
 @@ -763,12 +763,12 @@
1049
      {
1050
          if (s->group == NULL)
1051
          {
1052
 -            s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));
1053
 +            s->group = ap_psprintf(tp, "#%d", fcgi_util_get_server_gid(cmd->server));
1054
          }
1055
  
1056
          if (s->user == NULL)
1057
          {
1058
 -            s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server)); 
1059
 +            s->user = ap_psprintf(p, "#%d", fcgi_util_get_server_uid(cmd->server)); 
1060
          }
1061
  
1062
          s->uid = ap_uname2id(s->user);
1063
 @@ -954,12 +954,12 @@
1064
      {
1065
          if (s->group == NULL)
1066
          {
1067
 -            s->group = ap_psprintf(tp, "#%ld", fcgi_util_get_server_gid(cmd->server));
1068
 +            s->group = ap_psprintf(tp, "#%d", fcgi_util_get_server_gid(cmd->server)); 
1069
         }
1070
  
1071
          if (s->user == NULL)
1072
          {
1073
 -            s->user = ap_psprintf(p, "#%ld", fcgi_util_get_server_uid(cmd->server));
1074
 +            s->user = ap_psprintf(p, "#%d", fcgi_util_get_server_uid(cmd->server));
1075
          }
1076
  
1077
          s->uid = ap_uname2id(s->user); 
1078
 
1079
</pre>
1080
----
1081
1082
----
1083
1084
*fastcgi.conf*
1085
1086
<pre>
1087
 # This is the Apache server configuration file providing FastCGI support..
1088
 #
1089
 # Documentation is available at <http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html>
1090
 
1091
 LoadModule fastcgi_module lib/httpd/modules/mod_fastcgi.so
1092
 
1093
 # To use FastCGI to process .fcg .fcgi & .fpl scripts
1094
 AddHandler fastcgi-script fcg fcgi fpl
1095
</pre>
1096
1097
1098
----
1099
*doinst.sh*
1100
1101
<pre>
1102
 cp /etc/httpd/httpd.conf /etc/httpd/httpd.old
1103
 echo "Include /etc/httpd/extra/fastcgi.conf" >> /etc/httpd/httpd.conf 
1104
 echo "Restarting httpd ..."
1105
 sh /etc/rc.d/rc.httpd restart
1106
</pre>
1107
1108
1109
----
1110
*slack-desc*
1111
1112
<pre>
1113
            |-----handy-ruler------------------------------------------------------|
1114
 mod_fastcgi: mod_fastcgi 2.4.2
1115
 mod_fastcgi:
1116
 mod_fastcgi: A fastcgi module for httpd
1117
 mod_fastcgi:
1118
 mod_fastcgi:
1119
 mod_fastcgi:
1120
 mod_fastcgi:
1121
 mod_fastcgi:
1122
 mod_fastcgi:
1123
 mod_fastcgi:
1124
</pre>
1125
1126
1127
----
1128
*modfastcgi.Slackbuild
1129
1130
<pre>
1131
 #!/bin/sh
1132
 #
1133
 # $Id: mod_fastcgi-server.SlackBuild 275 2005-03-08 01:20:25Z freerock $
1134
 
1135
 CWD=`pwd`
1136
 TMP=${TMP:-/tmp}
1137
 PKG=$TMP/package-mod_fastcgi
1138
 
1139
 VERSION=2.4.2
1140
 ARCH=${ARCH:-i486}
1141
 BUILD=1
1142
 
1143
 if [ ! -d $TMP ]; then
1144
   mkdir -p $TMP # location to build the source
1145
 fi
1146
 rm -rf $PKG
1147
 mkdir -p $PKG
1148
 
1149
 if [ "$ARCH" = "i386" ]; then
1150
   SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
1151
 elif [ "$ARCH" = "i486" ]; then
1152
   SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
1153
 elif [ "$ARCH" = "s390" ]; then
1154
   SLKCFLAGS="-O2"
1155
 elif [ "$ARCH" = "x86_64" ]; then
1156
   SLKCFLAGS="-O2"
1157
 fi
1158
 
1159
 cd $TMP 
1160
 tar xzvf $CWD/mod_fastcgi-$VERSION.tar.gz
1161
 
1162
 cd mod_fastcgi-$VERSION
1163
 
1164
 echo "copiando patch ..."
1165
 
1166
 cp $CWD/mod_fastcgi-2.4.2-apache2.2.patch $TMP/mod_fastcgi-$VERSION
1167
 cp $CWD/mod_fastcgi-2.4.2-update.patch $TMP/mod_fastcgi-$VERSION
1168
 cp $CWD/mod_fastcgi-2.4.2-fix_warnings.patch $TMP/mod_fastcgi-$VERSION
1169
 
1170
 echo "aplicando patch ..."
1171
 
1172
 patch -p1 < mod_fastcgi-2.4.2-apache2.2.patch
1173
 patch -p1 < mod_fastcgi-2.4.2-update.patch
1174
 patch -p1 < mod_fastcgi-2.4.2-fix_warnings.patch
1175
 
1176
 rm Makefile
1177
 
1178
 cat Makefile.AP2 > Makefile
1179
 
1180
 LDFLAGS=-s \
1181
 CFLAGS="$SLKCFLAGS" \
1182
 CXXFLAGS="$SLKCFLAGS" 
1183
 
1184
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
1185
 echo -e  '\E[01;33;40m'"make em "`pwd`                                         ;tput sgr0;
1186
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
1187
 echo -e '\E[01;32;40m'
1188
 
1189
 topdir=$(/usr/bin/dirname $(/usr/sbin/apxs -q exp_installbuilddir))
1190
 
1191
 make top_dir=${topdir}
1192
 
1193
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
1194
 echo -e  '\E[01;33;40m'"make install "`pwd`                                    ;tput sgr0;
1195
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
1196
 echo -e '\E[01;36;40m'
1197
 
1198
 make top_dir=${topdir} DESTDIR=$PKG MKINSTALLDIRS="mkdir -p"  install
1199
 
1200
 tput sgr0;
1201
 
1202
 mkdir -p $PKG/etc/httpd/extra/
1203
 cp -a $CWD/fastcgi.conf $PKG/etc/httpd/extra/
1204
  
1205
 echo "Criando diretório de documentação ..."
1206
 mkdir -p $PKG/usr/doc/mod_fastcgi-$VERSION 
1207
 
1208
 echo "Copiando arquivos de documetação ..."
1209
 cp -a  INSTALL README CHANGES  $PKG/usr/doc/mod_fastcgi-$VERSION
1210
 
1211
 chmod 644 $PKG/usr/doc/mod_fastcgi-$VERSION/*
1212
 chown root.root $PKG/usr/doc/mod_fastcgi-$VERSION/* 
1213
 
1214
 find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded
1215
 gzip -9 $PKG/usr/man/*/*
1216
 
1217
 echo "criando diretório de scripts instalação ..."
1218
 mkdir -p $PKG/install
1219
 cat $CWD/slack-desc > $PKG/install/slack-desc
1220
 cat $CWD/doinst.sh >> $PKG/install/doinst.sh 
1221
 
1222
 echo "criando o pacote ..."
1223
 cd $PKG
1224
 makepkg -l y -c n $TMP/mod_fastcgi-$VERSION-$ARCH-$BUILD.tgz
1225
 
1226
 # Clean up the extra stuff:
1227
 if [ "$1" = "--cleanup" ]; then
1228
   rm -rf $TMP/template-$VERSION
1229
   rm -rf $PKG
1230
 fi
1231
</pre>
1232
1233
1234
h3. Mysql++ Slackbuild  
1235
1236
You can get the sources of Mysql++ at http://tangentsoft.net/mysql++/ or directly in
1237
http://tangentsoft.net/mysql++/releases/mysql++-2.3.2.tar.gz
1238
1239
1240
----
1241
You may need some how-to or tutorials on internet for mysql++ , so you may like this 
1242
http://www.devarticles.com/c/a/Cplusplus/Building-a-Store-Application-With-MySQL-and-C/
1243
----
1244
save this with *slack-desc* name in the sources + mysql++.Slacbuild directory
1245
1246
<pre>
1247
 # HOW TO EDIT THIS FILE:
1248
 # The "handy ruler" below makes it easier to edit a package description.  Line
1249
 # up the first '|' above the ':' following the base package name, and the '|' on
1250
 # the right side marks the last column you can put a character in. You must make
1251
 # exactly 11 lines for the formatting to be correct.  It's also customary to
1252
 # leave one space after the ':'.
1253
 
1254
        |-----handy-ruler------------------------------------------------------|
1255
 mysql++: mysql++-2.3.2      
1256
 mysql++:
1257
 mysql++: MySQL++ is a powerful C++ wrapper for MySQL's C API. 
1258
 mysql++: Its purpose is to make working with queries as easy as working
1259
 mysql++: with STL containers.
1260
 mysql++:
1261
 mysql++:
1262
 mysql++:
1263
 mysql++:
1264
 mysql++:
1265
 mysql++:
1266
</pre>
1267
1268
1269
----
1270
Now you can build package with mysql++.Slackbuild
1271
1272
----
1273
*Mysql++.Slackbuild
1274
1275
<pre>
1276
 #!/bin/sh
1277
 
1278
 # Slackware build script for mysql++ 
1279
 # Written by Chess Griffin <chess at chessgriffin dot com>
1280
 
1281
 PRGNAM=mysql++
1282
 VERSION=2.3.2
1283
 ARCH=${ARCH:-i486}
1284
 BUILD=${BUILD:-1}
1285
 TAG=${TAG:-MSXP}
1286
 CWD=$(pwd)
1287
 TMP=${TMP:-/tmp/SBo}	
1288
 PKG=$TMP/package-$PRGNAM
1289
 OUTPUT=${OUTPUT:-/tmp}
1290
 
1291
 if [ "$ARCH" = "i486" ]; then
1292
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"
1293
 elif [ "$ARCH" = "i686" ]; then
1294
   SLKCFLAGS="-O2 -march=i686 -mtune=i686"
1295
 fi
1296
 
1297
 rm -rf $PKG
1298
 mkdir -p $TMP $PKG $OUTPUT
1299
 cd $TMP || exit 1
1300
 rm -rf $PRGNAM-$VERSION
1301
 tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
1302
 cd $PRGNAM-$VERSION || exit 1
1303
 chown -R root:root .
1304
 chmod -R u+w,go+r-w,a-s .
1305
 
1306
 CFLAGS="$SLKCFLAGS" \
1307
 CXXFLAGS="$SLKCFLAGS" \
1308
 ./configure \
1309
   --prefix=/usr \
1310
   --sysconfdir=/etc \
1311
   --localstatedir=/var
1312
 
1313
 make 
1314
 
1315
 make install DESTDIR=$PKG
1316
 
1317
 if [ -d $PKG/usr/man ]; then
1318
 ( cd $PKG/usr/man
1319
   find . -type f -exec gzip -9 {} \;
1320
   for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
1321
 )
1322
 fi
1323
 
1324
 mkdir -p $PKG/install
1325
 cat $CWD/slack-desc > $PKG/install/slack-desc
1326
 
1327
 cd $PKG
1328
 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
1329
 
1330
</pre>
1331
1332
----
1333
1334
1335
h3. ICU Slackbuild  
1336
1337
optional
1338
1339
1340
h3. Wt-2.0.5 Slackbuild  
1341
1342
Finally tou ready for Witty.
1343
1344
Get witty sources on 
1345
http://www.webtoolkit.eu/ or in direct link
1346
http://easynews.dl.sourceforge.net/sourceforge/witty/wt-2.0.5.tar.gz
1347
1348
----
1349
#put this description file file as *slack-desc* in wt.Slackbuild source directory
1350
<pre>
1351
 # HOW TO EDIT THIS FILE:
1352
 # The "handy ruler" below makes it easier to edit a package description.  Line
1353
 # up the first '|' above the ':' following the base package name, and the '|' on
1354
 # the right side marks the last column you can put a character in. You must make
1355
 # exactly 11 lines for the formatting to be correct.  It's also customary to
1356
 # leave one space after the ':'.
1357
 
1358
   |-----handy-ruler------------------------------------------------------|
1359
 wt: wt-2.0.5 - Webtoolkit
1360
 wt:
1361
 wt: Wt (pronounced 'witty') is a C++ library and application server
1362
 wt: for developping and deploying web applications. The API is 
1363
 wt: widget-centric, and inspired by existing C++ Graphical User Interface 
1364
 wt: (GUI) APIs. To the developer, it offers complete abstraction of any 
1365
 wt: web-specific implementation details.
1366
 wt: In contrast, a web application developed with Wt is written in only 
1367
 wt: one compiled language (C++), from which the library generates the 
1368
 wt: necessary HTML, Javascript, CGI, and AJAX code.
1369
 wt:
1370
 wt: http://www.webtoolkit.eu/
1371
 wt:
1372
</pre>
1373
1374
1375
1376
1377
----
1378
1379
#put this config file in Slackbuild + source directory
1380
*wt_httpd.conf*
1381
1382
<pre>
1383
 <Directory /var/www/wt/>
1384
 	#Order Deny,Allow
1385
 	Allow from all
1386
 	# Don't show indexes for directories on publicly accessible machines (Uncomment if it's a private devshell).
1387
 	#Options -Indexes
1388
 	# Enable CGIs to be executed 
1389
 	Options ExecCGI
1390
 </Directory> 
1391
 
1392
</pre>
1393
----
1394
1395
#put this post-install script file in Slackbuild + source directory
1396
*doinst.sh*
1397
<pre>
1398
 echo "backup /etc/httpd/httpd.conf as httpd.conf.old ..."
1399
 cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.old 
1400
 echo "Including /etc/httpd/extra/wt_httpd.conf in httpd.conf ..."
1401
 echo "Include /etc/httpd/extra/wt_httpd.conf" >> /etc/httpd/httpd.conf  
1402
 echo "Reloading Apache httpd ..."
1403
 sh /etc/rc.d/rc.httpd restart
1404
</pre>
1405
1406
----
1407
*wt.Slackbuild*
1408
1409
<pre>
1410
 #!/bin/sh
1411
 # Slackware build script for wt.
1412
 NAME=wt
1413
 
1414
 # Get the current and temporary directories
1415
 CWD=`pwd`
1416
 if [ "$TMP" = "" ]; then
1417
   TMP=/tmp
1418
 fi
1419
 PKG=$TMP/package-$NAME
1420
 
1421
 VERSION=${VERSION:-2.0.5}
1422
 ARCH=${ARCH:-i486}
1423
 BUILD=${BUILD:-1}
1424
 
1425
 if [ "$ARCH" = "i386" ]; then
1426
   SLKCFLAGS="-O2 -m32 -march=i386 -mcpu=i386"
1427
 elif [ "$ARCH" = "i486" ]; then
1428
   SLKCFLAGS="-O2 -m32 -march=i486 -mtune=i686"
1429
 elif [ "$ARCH" = "s390" ]; then
1430
   SLKCFLAGS="-O2"
1431
 elif [ "$ARCH" = "x86_64" ]; then
1432
   SLKCFLAGS="-O2"
1433
 fi
1434
 
1435
 if [ ! -d $TMP ]; then
1436
   mkdir -p $TMP # location to build the source
1437
 fi
1438
 
1439
 # Clean up a previous build
1440
 rm -rf $PKG
1441
 mkdir -p $PKG 
1442
 
1443
 # Decompress
1444
 cd $TMP
1445
 rm -rf $NAME-$VERSION
1446
 tar xvf $CWD/$NAME-$VERSION.tar.gz || exit 1
1447
 cd $NAME-$VERSION
1448
 
1449
 # Fix
1450
 chown -R root:root .
1451
 find . -perm 666 -exec chmod 644 {} \;
1452
 find . -perm 664 -exec chmod 644 {} \;
1453
 find . -perm 600 -exec chmod 644 {} \;
1454
 find . -perm 444 -exec chmod 644 {} \;
1455
 find . -perm 400 -exec chmod 644 {} \;
1456
 find . -perm 440 -exec chmod 644 {} \;
1457
 find . -perm 777 -exec chmod 755 {} \;
1458
 find . -perm 775 -exec chmod 755 {} \;
1459
 find . -perm 511 -exec chmod 755 {} \;
1460
 find . -perm 711 -exec chmod 755 {} \;
1461
 find . -perm 555 -exec chmod 755 {} \;
1462
 
1463
 mkdir -p $PKG/var/www/wt
1464
 mkdir -p $PKG/etc/wt
1465
 
1466
 mkdir $PKG/usr/src/wt
1467
 cp $CWD/wt.Slackbuild $PKG/usr/src/wt
1468
 
1469
 mkdir `pwd`/build
1470
 cd `pwd`/build
1471
 
1472
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
1473
 echo -e  '\E[01;33;40m'"execucao do script  cmake para wt em "`pwd`            ;tput sgr0;
1474
 echo -e '\E[01;32;40m'"**************************************************"     ;tput sgr0;
1475
 echo -e '\E[01;36;40m'
1476
 
1477
 cmake -D DEPLOYROOT=/var/www/wt \
1478
 -D WEBUSER=apache \
1479
 -D BUILD_SHARED_LIBS=ON \
1480
 -D CONFIGURATION=/etc/wt \
1481
 -D BOOST_COMPILER=gcc \
1482
 -D BOOST_VERSION=1_34_1 \
1483
 -D BOOST_DIR=/usr \
1484
 -D RUNDIR=/var/run \
1485
 -D CMAKE_INSTALL_PREFIX=/usr \
1486
 -D HTTP_WITH_SSL=true \
1487
 -D CONNECTOR_FCGI=true \
1488
 -D EXAMPLES_CONNECTOR=wthttp \
1489
 -D WEBGROUP=users ../
1490
 #-D EXECUTABLE_OUTPUT_PATH=/var/www/wt/bin \
1491
 
1492
 
1493
 # Build
1494
 
1495
 echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;
1496
 echo -e  '\E[01;33;40m'"        Compilando wt com make em " `pwd`          ; tput sgr0;
1497
 echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;
1498
 echo -e '\E[01;34;40m';
1499
 
1500
 make
1501
 
1502
 echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;
1503
 echo -e  '\E[01;33;40m'"        Compilando exemplos com make em " `pwd`          ; tput sgr0;
1504
 echo -e '\E[01;32;40m'"**************************************************" ; tput sgr0;
1505
 echo -e '\E[01;32;40m';
1506
 
1507
 make -C examples
1508
 
1509
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
1510
 echo -e  '\E[01;33;40m'"instalado wt  em $PKG com o make  install"        ;tput sgr0;
1511
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
1512
 echo -e '\E[01;35;40m';
1513
 
1514
 make install DESTDIR=$PKG
1515
 
1516
 
1517
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
1518
 echo -e  '\E[01;33;40m'"instalado wt examples  em $PKG             "      ;tput sgr0;
1519
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
1520
 echo -e '\E[01;32;40m';
1521
 
1522
 
1523
 mkdir -p $PKG/usr/share/$NAME-$VERSION/examples
1524
 cp -a $TMP/$NAME-$VERSION/build/examples $PKG/usr/share/$NAME-$VERSION/
1525
  
1526
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0;
1527
 echo -e  '\E[01;33;40m'"Montando o pacote"                                ;tput sgr0;
1528
 echo -e '\E[01;32;40m'"**************************************************";tput sgr0; 
1529
 
1530
 # Clean up a previous build
1531
 rm -rf $PKG/etc/wt
1532
 mkdir -p $PKG/etc/wt 
1533
 
1534
 rm -rf $PKG/var/www/wt
1535
 mkdir -p $PKG/var/www/wt
1536
 
1537
 mkdir -p $PKG/etc/httpd/extra
1538
 cp $CWD/wt_httpd.conf $PKG/etc/httpd/extra
1539
 
1540
 
1541
 # Gzip man pages
1542
 find $PKG/usr/man -name "*.[123456789]" -exec gzip -9 {} \;
1543
 
1544
 # Strip binaries
1545
 ( cd $PKG
1546
   find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
1547
   find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
1548
 )
1549
 
1550
 # Copy Slackware package files
1551
 mkdir -p $PKG/install
1552
 cat $CWD/slack-desc > $PKG/install/slack-desc
1553
 cat $CWD/doinst.sh >> $PKG/install/doinst.sh
1554
 
1555
 # Create package
1556
 echo "Creating package"
1557
 cd $PKG
1558
 makepkg -l y -c n ../$NAME-$VERSION-$ARCH-$BUILD.tgz 
1559
 
1560
 # Clean up
1561
 if [ "$1" = "--cleanup" ]; then 
1562
 	rm -rf $TMP/$NAME-$VERSION
1563
 	rm -rf $PKG
1564
 fi
1565
</pre>
1566
1567
1568
h3. Testing Witty without apache 
1569
1570
open a konsole window and
1571
1572
<pre>
1573
 cd /usr/share/wt-2.0.5/examples/
1574
 cd hello
1575
 sh deploy.sh
1576
</pre>
1577
1578
then go to
1579
<pre>
1580
 cd /var/www/wt/hello
1581
 cd /var/www/wt/hello/
1582
 ./hello.wt --docroot . --http-address your.ip.com --http-port 8080
1583
</pre>
1584
1585
and open your browser at http://you.ip.com:8080
1586
1587
Have a fun !!!