1. VectorLinux Core
  2. vabs

Commits

Lee Pak Hong  committed c6c894a

Build tix with local tk and tcl library instead of downloading the src

Signed-off-by: Lee Pak Hong <benreilly@vector.Linux.net>

  • Participants
  • Parent commits 6e373fa
  • Branches veclinux-7.1

Comments (0)

Files changed (1)

File var/vabs/tix/src/tix.SlackBuild

View file
 VERSION=${VERSION:-"8.4.3"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"M0E-lnx"}   #Enter your Name!
-LINK=${LINK:-"http://downloads.sourceforge.net/project/$NAME/$NAME/$VERSION/Tix$VERSION-src.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2F$NAME%2Ffiles%2F" http://downloads.sourceforge.net/project/tcl/Tcl/8.5.9/tk8.5.9-src.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ftcl%2Ffiles%2FTcl%2F8.5.9%2F&ts=1331903970&use_mirror=softlayer http://downloads.sourceforge.net/project/tcl/Tcl/8.5.9/tcl8.5.9-src.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Ftcl%2Ffiles%2FTcl%2F8.5.9%2F&ts=1331904132&use_mirror=superb-dca2 }  #Enter URL for package here!
 tkver=8.5.9
+#LINK=${LINK:-"http://downloads.sourceforge.net/tix/Tix${VERSION}-src.tar.gz http://downloads.sourceforge.net/sourceforge/tcl/tk${tkver}-src.tar.gz http://downloads.sourceforge.net/sourceforge/tcl/tcl${tkver}-src.tar.gz"}  #Enter URL for package here!
+LINK=${LINK:-"http://downloads.sourceforge.net/tix/Tix${VERSION}-src.tar.gz"}  #Enter URL for package here!
 
 #SYSTEM VARIABLES
 #----------------------------------------------------------------------------
 LDFLAG_OPTIONS=${LDFLAG_OPTIONS:-""}
 ADDRB=${ADDRB:-""} #Add deps that need to be added to the slack-required file here
 EXRB=${EXRB:-""} #Add deps that need to be excluded from the slack-required file here
+MAKEDEPENDS=${MAKEDEPENDS:-"tcl tk"} #Add deps needed TO BUILD this package here.
 #----------------------------------------------------------------------------
 
-if [ "$NORUN" != 1 ]; then
+# DO NOT EXECUTE if NORUN is set to 1
+if [ "$NORUN" != "1" ]; then
+
 #SETUP PACKAGING ENVIRONMENT
 #--------------------------------------------
 CWD=$(pwd)
 PKG=$TMP/package-$NAME
 #--------------------------------------------
 
-
+# manual set local tcl and tk generic include path
+TCL_GENERIC_INC_PATH="/usr/include"
+TK_GENERIC_INC_PATH="/usr/include/tk-private/generic"
 
 if [ $UID != 0 ]; then
    echo "You are not authorized to run this script. Please login as root"
 mkdir -p $PKG
 
 # For some reason, this thing expects the tk and tcl sources extracted to /tmp
-tar xfv $CWD/tk${tkver}-src.tar.gz -C /tmp || exit 1
-tar xfv $CWD/tcl${tkver}-src.tar.gz -C /tmp || exit 1
+#tar xfv $CWD/tk${tkver}-src.tar.gz -C /tmp || exit 1
+#tar xfv $CWD/tcl${tkver}-src.tar.gz -C /tmp || exit 1
 #-----------------------------------------------------
 
 
 # your patches use the -p1 strip option!
 #-----------------------------------------------------
 for i in $CWD/patches/*;do
-  zcat $i | patch -p1  || exit 1
+#  zcat $i | patch -p1  || exit 1
   mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
   cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
 done
 #-----------------------------------------------------
- 
- 
+
+zcat $CWD/patches/tix.tcl8.5.patch.gz | patch -p1 --backup --suffix=.orig || exit 1
+zcat $CWD/patches/tix.soname.patch.gz | patch -p1 || exit 1 
+
+# configure to use local tcl and tk library 
+# instead of downloading tcl and tk src to /tmp
+sed -i 's|${TCL_SRC_DIR}/generic/tclInt.h|'$TCL_GENERIC_INC_PATH'/tclInt.h|g' configure
+sed -i 's|${TK_SRC_DIR}/generic/tkInt.h|'$TK_GENERIC_INC_PATH'/tkInt.h|g' configure
+sed -i 's|tclPort.h|'$TCL_GENERIC_INC_PATH'/tclPort.h|g' generic/tixPort.h
+sed -i 's|tclInt.h|'$TCL_GENERIC_INC_PATH'/tclInt.h|g' generic/tixWidget.c
+sed -i 's|tkInt.h|'$TK_GENERIC_INC_PATH'/tkInt.h|g' generic/tixInputO.c
+sed -i 's|tkInt.h|'$TK_GENERIC_INC_PATH'/tkInt.h|g' unix/tixUnixMwm.c
+
 
 #SET PERMISSIONS
 #-----------------------------------------
 #######################################################################
 #Miscellenious tweaks and things outside a normal ./configure go here #
 # Remove the junk from te tcl and tk sources 
-rm -rf /tmp/tk${tkver} || exit 1
-rm -rf /tmp/tcl${tkver} || exit 1
+#rm -rf /tmp/tk${tkver} || exit 1
+#rm -rf /tmp/tcl${tkver} || exit 1
 #######################################################################
 
-
+mkdir -p $PKG/usr/man/mann
+cp -a man/*.n $PKG/usr/man/mann
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
-$PKG/usr/doc/$NAME-$VERSION
+cp -a ABOUT.* README.* license.terms docs/FAQ.txt docs/Files.* \
+	docs/Release-8.4* docs/license* docs/html \
+	$PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
 
 #----------------------------------------------------------------------
 cd $CWD
 echo "Cleaning up temp files..." && rm -rf $TMP
 echo "Package Complete"
-#--------------------------------------------------------------
 fi
+#--------------------------------------------------------------
+
 # vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##