Thread: [Apachetoolbox-devel] PDFLib Binary Option
Brought to you by:
bryanandrews
From: Greg K. <gk...@gr...> - 2002-09-19 16:43:33
|
Who maintains the PDFLib option? I modified mine to allow the selection o= f the=20 source or binary distribution. I'd like to see it get added in the main=20 release. Greg |
From: Kevin J. M. Jr. <km...@WP...> - 2002-09-26 20:08:55
|
Hey Greg, Well, I've been a bit busy with school and what not, but you can send it to me, or to Bryan. I think I may actually have devel ATB branch kicking around with your changes, but I'll have to go looking for that sometime later. In any case, just send it on over to whomever. -- Kevin Thursday, September 19, 2002, 12:47:36 PM, you wrote: GK> Who maintains the PDFLib option? I modified mine to allow the selection of the GK> source or binary distribution. I'd like to see it get added in the main GK> release. GK> Greg GK> ------------------------------------------------------- GK> This sf.net email is sponsored by:ThinkGeek GK> Welcome to geek heaven. GK> http://thinkgeek.com/sf GK> _______________________________________________ GK> Apachetoolbox-devel mailing list GK> Apa...@li... GK> https://lists.sourceforge.net/lists/listinfo/apachetoolbox-devel |
From: Greg K. <gk...@gr...> - 2002-09-26 20:48:36
|
Kevin, I sent them to Bryan some time agao, but here it is again. It's copy/past= ed,=20 so I hope the line endings turned out okay. Here they are. I tested this on a raw system with .61 and it worked fine. patch for bin/php: 34c34,35 < test $INSTALL_PHP_PDFLIB -eq $TRUE && . $root/bin/php-pdflib --- > test $INSTALL_PHP_PDFLIB_SRC -eq $TRUE && . $root/bin/php-pdflib > test $INSTALL_PHP_PDFLIB_BINARY -eq $TRUE && . $root/bin/php-pdflib-bin= ary patch for bin/save-settings: 21a22,23 > INSTALL_PHP_PDFLIB_SRC=3D$INSTALL_PHP_PDFLIB_SRC > INSTALL_PHP_PDFLIB_BINARY=3D$INSTALL_PHP_PDFLIB_BINARY patch for bin/load-settings: 32a33,34 > pull INSTALL_PHP_PDFLIB_SRC; INSTALL_PHP_PDFLIB_SRC=3D$data > pull INSTALL_PHP_PDFLIB_BINARY; INSTALL_PHP_PDFLIB_BINARY=3D$data patch for etc/defaults.conf: 22c22 < PDFLIB=3D4.0.2 --- > PDFLIB=3D4.0.3 57c57 < FREETYPE=3D2.1.1 --- > FREETYPE=3D2.1.2 133a134,135 > INSTALL_PHP_PDFLIB_SRC=3D$FALSE > INSTALL_PHP_PDFLIB_BINARY=3D$FALSE patch for etc/php.menu: 12c12 < comp_menu_item 7 "$INSTALL_PHP_PDFLIB" "PDFlib"; TAB;TAB;TAB; comp_menu= _item=20 8 "$INSTALL_PHP_UNIXODBC" "unixODBC\n"; --- > comp_menu_item 7 "$INSTALL_PHP_PDFLIB" "-PDFlib-"; TAB;TAB;TAB;=20 comp_menu_item 8 "$INSTALL_PHP_UNIXODBC" "unixODBC\n"; 63a64,65 > INSTALL_PHP_PDFLIB_SRC=3D$FALSE > INSTALL_PHP_PDFLIB_BINARY=3D$FALSE 102,104c104,105 < test_choice INSTALL_PHP_PDFLIB $INSTALL_PHP_PDFLIB < INSTALL_PHP_PDFLIB=3D$var < ;; --- > . etc/pdf.menu > ;; Here is etc/pdf.menu: CONTINUE6=3D$FALSE CHOICE6=3D while [ $CONTINUE6 -eq $FALSE ] do clear banner comp_menu_item 1 "$INSTALL_PHP_PDFLIB_SRC" "PDFlib Source"; TAB;TAB;TAB;=20 comp_menu_item 2 "$INSTALL_PHP_PDFLIB_BINARY" "PDFlib Binary\n"; echo echo -e " go) Back to main menu..." echo_line echo -e "Choice [?] \c" read CHOICE6 case "$CHOICE6" in 1) test_choice INSTALL_PHP_PDFLIB_SRC $INSTALL_PHP_PDFLIB_SRC INSTALL_PHP_PDFLIB_SRC=3D$var if [ $var -eq $FALSE ] then INSTALL_PHP_PDFLIB_SRC=3D$FALSE INSTALL_PHP_PDFLIB=3D$FALSE else INSTALL_PHP_PDFLIB=3D$TRUE INSTALL_PHP_PDFLIB_BINARY=3D$FALSE fi ;; 2) test_choice INSTALL_PHP_PDFLIB_BINARY $INSTALL_PHP_PDFLIB_BINARY INSTALL_PHP_PDFLIB_BINARY=3D$var if [ $var -eq $FALSE ] then INSTALL_PHP_PDFLIB_BINARY=3D$FALSE INSTALL_PHP_PDFLIB=3D$FALSE else INSTALL_PHP_PDFLIB=3D$TRUE INSTALL_PHP_PDFLIB_SRC=3D$FALSE fi ;; go) CONTINUE6=3D$TRUE ;; q) CONTINUE6=3D$TRUE ;; *) echo "Invalid Selection..." HitAnyKey esac done Here is bin/php-pdf.patch: 371c371 < extension_dir =3D ./ --- > extension_dir =3D /usr/local/lib 436c436 < --- > extension =3D libpdf_php.so Here is bin/php-pdflib-binary: # Greg Kopp, 2002 # Added ability to integrate binary version of PDFLib into PHP as a dynam= ic=20 module cd $root/src notice "$MENUTRUE" "Setting up PDFlib Module..." for i in / /usr /usr/local /opt $LOCAL_PATH; do test -f $i/lib/libpdf.a && export LIBPDF_DIR=3D"$i"; test -f $i/lib/libtiff.a && export LIBTIFF_DIR=3D"$i"; test -f $i/lib/libjpeg.a && export LIBJPEG_DIR=3D"$i"; test -f $i/lib/libz.so && export ZLIB_DIR=3D"$i"; done echo test -z $LIBTIFF_DIR && echo; . $root/bin/libtiff test -z $LIBJPEG_DIR && echo; . $root/bin/libjpeg # Patch by Dominique MASSONIE <mas...@li...> # current dir (i.e. $root/src) get lost when both # 'libtiff' & 'libjpeg' scripts go through "cd $root" cd $root/src if [ -d $LIBPDF_DIR ];then check_source "pdflib-${PDFLIB}-Linux.tar.gz"=20 "http://www.pdflib.com/pdflib/download/pdflib-${PDFLIB}-Linux.tar.gz" notice "$MENUTRUE" " PDFlib uncompressing...\n" explode pdflib-${PDFLIB}-Linux.tar.gz notice "$MENUTRUE" " PDFlib uncompressed.\n" cd pdflib-$PDFLIB-Linux/bind/php/php-4.2.1 notice "$MENUTRUE" " Copying libraries..." cp libpdf_php.so $LOCAL_PATH/lib/ echo " [$DONE]" notice "$MENUTRUE" " Patching php.ini..." cat $root/bin/php-pdf.patch | patch $root/src/php-$PHP/php.ini-dist >=20 $logdir/php-pdflib-patch.log echo " [$DONE]" export LIBPDF_DIR=3D"$LOCAL_PATH"; fi if [ ! -z $LIBPDF_DIR ] && [ ! -z $LIBTIFF_DIR ] && [ ! -z $LIBJPEG_DIR ]= && [=20 ! -z $ZLIB_DIR ]; then CONFIGPHP=3D"$CONFIGPHP --with-pdflib=3Dno $r--with-tiff-dir=3D\"$LIBTIFF= _DIR\"=20 $r--with-jpeg-dir=3D\"$LIBJPEG_DIR\" $r--with-zlib-dir=3D\"$ZLIB_DIR\" $r= " else notice "$MENUFALSE" " PDFlib failed! Couldn't find libtiff and/or libjpeg= =20 and/or zlib anywhere.\n\n" echo -en=20 "LIBTIFF_DIR=3D$LIBTIFF_DIR\nLIBJPEG_DIR=3D$LIBJPEG_DIR\nZLIB_DIR=3D$ZLIB= _DIR\n" exit 1 fi On Thursday 26 September 2002 04:04 pm, Kevin J. Menard, Jr. wrote: > Hey Greg, > > Well, I've been a bit busy with school and what not, but you can send i= t to > me, or to Bryan. I think I may actually have devel ATB branch kicking > around with your changes, but I'll have to go looking for that sometime > later. In any case, just send it on over to whomever. |