summaryrefslogtreecommitdiffstats
path: root/source.mk
blob: 0556187715d1814db403ce7971ae8d7d34e32cd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Tcl embeds a copy of zlib, but zlib has some non-free RFCs.  Since Tcl can be
# built with the system zlib, just remove the whole embedded copy.

upstream_ver = $$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \
	sed 's/^\([0-9a-z.~-][0-9a-z.~-]*\)+sip[1-9][0-9]*.*$$/\1/')
upstream_sf_base = http://downloads.sourceforge.net/project/tcl
upstream_archive = tcl-core$(upstream_ver)-src.tar.gz
upstream_url = $(upstream_sf_base)/Tcl/$(upstream_ver)/$(upstream_archive)
source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.gz

$(source_archive):
	wget -O - "$(upstream_url)" | tar -xz
	rm -Rf "tcl$(upstream_ver)/compat/zlib"
	tar -czf '$(source_archive)' "tcl$(upstream_ver)"
	rm -Rf src
	mv "tcl$(upstream_ver)" src

source: $(source_archive)