summaryrefslogtreecommitdiff
path: root/tk/Pkgfile
blob: 75b1e6bd9f7ea0e4a6740bacf8315c28f1b097b1 (plain)
    1 # Description: A GUI toolkit for TCL.
    2 # URL: https://www.tcl.tk/
    3 # Maintainer: Danny Rawlins, crux at romster dot me
    4 # Depends on: xorg-libxft tcl
    5 
    6 name=tk
    7 version=8.6.13
    8 _version=$(echo $version | awk -F'.' '{if (NF <= '2') {print $0} else {print $1 "." $2 "." $3}}')
    9 release=1
   10 source=(https://downloads.sourceforge.net/project/tcl/Tcl/$_version/$name$version-src.tar.gz)
   11 
   12 build() {
   13 	cd $name$_version/unix
   14 
   15 	./configure \
   16 		--prefix=/usr \
   17 		--mandir=/usr/share/man \
   18 		--enable-gcc \
   19 		--enable-shared \
   20 		--enable-xft
   21 
   22 	make
   23 	make MKLINKS_FLAGS="-s" INSTALL_ROOT=$PKG install install-private-headers
   24 
   25 	cp ../generic/*.h $PKG/usr/include/
   26 	cp tkUnixPort.h $PKG/usr/include/tkPort.h
   27 	cp tkUnixDefault.h $PKG/usr/include/tkDefault.h
   28 	cp tkUnixInt.h $PKG/usr/include/tkInt.h
   29 
   30 	# remove $SRC traces
   31 	sed \
   32 		-e "s|$SRC/tk$_version/unix|/usr/lib|g" \
   33 		-e "s|$SRC/tk$_version|/usr/include|g" \
   34 		-i $PKG/usr/lib/tkConfig.sh
   35 
   36 	rm -r $PKG/usr/lib/tk${_version%.*}/demos
   37 	rm $PKG/usr/lib/tk${_version%.*}/images/README
   38 
   39 	ln -s wish${_version%.*} $PKG/usr/bin/wish
   40 	ln -s libtk${_version%.*}.so $PKG/usr/lib/libtk.so
   41 	ln -s libtkstub${_version%.*}.a $PKG/usr/lib/libtkstub.a
   42 
   43 	chmod -R u+w $PKG/usr/share/man
   44 }

Generated by cgit