wok-next diff rrdtool/receipt @ rev 21068

Rebuild Perl modules
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Dec 11 23:38:35 2018 +0200 (2018-12-11)
parents d457c4e37c1b
children 5669e8b3be70
line diff
     1.1 --- a/rrdtool/receipt	Fri Nov 09 13:21:03 2018 +0200
     1.2 +++ b/rrdtool/receipt	Tue Dec 11 23:38:35 2018 +0200
     1.3 @@ -12,73 +12,74 @@
     1.4  WGET_URL="https://oss.oetiker.ch/rrdtool/pub/$TARBALL"
     1.5  
     1.6  BUILD_DEPENDS="perl-dev zlib-dev freetype-dev libpng16-dev libxml2-dev \
     1.7 -fontconfig-dev xorg-pixman-dev cairo-dev glib-dev pango-dev python-dev perl groff \
     1.8 -tcl-dev lua5.1-dev ruby gettext-dev"
     1.9 -SPLIT="$PACKAGE-perl $PACKAGE-python $PACKAGE-dev $PACKAGE"
    1.10 +fontconfig-dev xorg-pixman-dev cairo-dev glib-dev pango-dev python-dev perl \
    1.11 +groff tcl-dev lua5.1-dev ruby-dev gettext-dev libwrap-dev glib-dev"
    1.12 +SPLIT="$PACKAGE-lua $PACKAGE-perl $PACKAGE-python $PACKAGE-ruby $PACKAGE-tcl \
    1.13 +$PACKAGE-dev $PACKAGE $PACKAGE-lite:lite"
    1.14  
    1.15 -SIBLINGS="rrdtool-lite"
    1.16 +COPY_std="bin/ lib/librrd.so*"
    1.17 +COPY_lua="lua/5.1/*.so*"
    1.18 +COPY_perl="perl5/"
    1.19 +COPY_python="python2.7/"
    1.20 +COPY_ruby="ruby/"
    1.21 +COPY_tcl="*.tcl tcl*.so"
    1.22 +COPY_lite="bin/ lib/librrd.so*"
    1.23 +
    1.24 +CAT_lua="development|Lua bindings"
    1.25 +CAT_perl="development|Perl bindings"
    1.26 +CAT_python="development|Python bindings"
    1.27 +CAT_tcl="development|Tcl bindings"
    1.28 +
    1.29 +DEPENDS_lua="lua5.1 rrdtool"
    1.30 +DEPENDS_perl="perl rrdtool"
    1.31 +DEPENDS_python="python rrdtool"
    1.32 +DEPENDS_ruby="ruby rrdtool"
    1.33 +DEPENDS_tcl="tcl rrdtool"
    1.34 +DEPENDS_dev="rrdtool"
    1.35 +DEPENDS_std="cairo glib libpng16 libwrap libxml2 pango"
    1.36 +DEPENDS_lite="glib libxml2"
    1.37 +
    1.38 +TAGS_std="logs"
    1.39 +TAGS_lite="logs"
    1.40  
    1.41  compile_rules() {
    1.42 -	sed -i 's/PL_sv_undef sv_undef/PL_sv_undef PL_sv_undef/' bindings/perl-shared/RRDs.xs
    1.43 -	export LDFLAGS="$LDFLAGS -L/usr/lib/lua/5.1"
    1.44 +	case $SET in
    1.45 +		'')
    1.46 +			export LDFLAGS="$LDFLAGS -L/usr/lib/lua/5.1"
    1.47  
    1.48 -	TOREMOVE="/usr/include/lua5.1 /usr/lib/lua5.1"
    1.49 -	ln -s lua/5.1 /usr/include/lua5.1
    1.50 -	ln -s lua/5.1 /usr/lib/lua5.1
    1.51 -	for i in /usr/bin/lua /usr/bin/luac; do
    1.52 -		[ -e $i ] && continue
    1.53 -		ln -s $(basename $i)5.1 $i
    1.54 -		TOREMOVE="$TOREMOVE $i"
    1.55 -	done
    1.56 +			ln -sf lua/5.1 /usr/include/lua5.1
    1.57 +			ln -sf lua/5.1 /usr/lib/lua5.1
    1.58 +			ln -sf lua5.1  /usr/bin/lua
    1.59 +			ln -sf luac5.1 /usr/bin/luac
    1.60 +
    1.61 +			SET_ARGS="\
    1.62 +				--enable-perl-site-install \
    1.63 +				--with-perl-options='INSTALLDIRS=vendor' \
    1.64 +				--enable-ruby-site-install \
    1.65 +				--enable-lua-site-install \
    1.66 +				--enable-tcl-site"
    1.67 +			;;
    1.68 +		lite)
    1.69 +			SET_ARGS="\
    1.70 +				--disable-rrdcgi \
    1.71 +				--disable-rrd_graph \
    1.72 +				--disable-nls \
    1.73 +				--disable-libdbi \
    1.74 +				--disable-libwrap \
    1.75 +				--disable-perl \
    1.76 +				--disable-ruby \
    1.77 +				--disable-lua \
    1.78 +				--disable-tcl \
    1.79 +				--disable-python"
    1.80 +			;;
    1.81 +	esac
    1.82  
    1.83  	./configure \
    1.84 -		--enable-perl-site-install \
    1.85 +		$SET_ARGS \
    1.86  		$CONFIGURE_ARGS &&
    1.87  	fix libtool &&
    1.88  	make &&
    1.89 -	make DESTDIR=$install install || return 1
    1.90 +	make DESTDIR=$install install &&
    1.91  
    1.92 -	for i in $TOREMOVE; do
    1.93 -		rm -f $i
    1.94 -	done
    1.95 +	find $install -type f -exec chmod u+w '{}' \;
    1.96  }
    1.97 -
    1.98 -genpkg_rules() {
    1.99 -	case $PACKAGE in
   1.100 -		rrdtool-doc)
   1.101 -			copy doc/ examples/
   1.102 -			CAT="development|documentation and examples"
   1.103 -			;;
   1.104 -		rrdtool-lua)
   1.105 -			copy lua/
   1.106 -			find $fs -name '*.la' -delete
   1.107 -			CAT="development|Lua bindings"
   1.108 -			DEPENDS="lua5.1 rrdtool"
   1.109 -			;;
   1.110 -		rrdtool-man)
   1.111 -			copy man/
   1.112 -			CAT="development|man pages"
   1.113 -			;;
   1.114 -		rrdtool-perl)
   1.115 -			copy perl5/
   1.116 -			CAT="development|Perl bindings"
   1.117 -			DEPENDS="perl rrdtool"
   1.118 -			;;
   1.119 -		rrdtool-python)
   1.120 -			copy python2.7/
   1.121 -			CAT="development|Python bindings"
   1.122 -			DEPENDS="python rrdtool"
   1.123 -			;;
   1.124 -		rrdtool-dev)
   1.125 -			copy @dev examples/
   1.126 -			DEPENDS="rrdtool"
   1.127 -			;;
   1.128 -		rrdtool)
   1.129 -			copy @std @rm
   1.130 -			rm -r $fs/usr/lib/perl5/ # ... empty
   1.131 -			DEPENDS="zlib freetype libpng16 libxml2 fontconfig xorg-pixman \
   1.132 -			cairo glib pango xorg-xcb-util xorg-base-fonts libwrap"
   1.133 -			TAGS="logs"
   1.134 -			;;
   1.135 -	esac
   1.136 -}